Skip to content

Commit 7014d7f

Browse files
sf-hgkdavem330
authored andcommitted
sfc: allow asynchronous MCDI without completion function
Signed-off-by: Bert Kenward <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d29e33d commit 7014d7f

File tree

1 file changed

+4
-1
lines changed
  • drivers/net/ethernet/sfc

1 file changed

+4
-1
lines changed

drivers/net/ethernet/sfc/mcdi.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,10 @@ static bool efx_mcdi_complete_async(struct efx_mcdi_iface *mcdi, bool timeout)
548548
efx_mcdi_display_error(efx, async->cmd, async->inlen, errbuf,
549549
err_len, rc);
550550
}
551-
async->complete(efx, async->cookie, rc, outbuf, data_len);
551+
552+
if (async->complete)
553+
async->complete(efx, async->cookie, rc, outbuf,
554+
min(async->outlen, data_len));
552555
kfree(async);
553556

554557
efx_mcdi_release(mcdi);

0 commit comments

Comments
 (0)