Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 429baa6f authored by Bert Kenward's avatar Bert Kenward Committed by David S. Miller
Browse files

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: default avatarBert Kenward <bkenward@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 88e4f759
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1156,6 +1156,7 @@ 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) {
		if (async->complete)
			async->complete(efx, async->cookie, -ENETDOWN, NULL, 0);
		list_del(&async->list);
		kfree(async);