mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
sfc: check async completer is !NULL before calling
Add a NULL check before calling asynchronous MCDI completion functions
during device removal.
Fixes: 7014d7f6 ("sfc: allow asynchronous MCDI without completion function")
Signed-off-by: Bert Kenward <bkenward@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
88e4f75900
commit
429baa6f0e
1 changed files with 2 additions and 1 deletions
|
|
@ -1156,7 +1156,8 @@ void efx_mcdi_flush_async(struct efx_nic *efx)
|
|||
* acquired locks in the wrong order.
|
||||
*/
|
||||
list_for_each_entry_safe(async, next, &mcdi->async_list, list) {
|
||||
async->complete(efx, async->cookie, -ENETDOWN, NULL, 0);
|
||||
if (async->complete)
|
||||
async->complete(efx, async->cookie, -ENETDOWN, NULL, 0);
|
||||
list_del(&async->list);
|
||||
kfree(async);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue