Skip to content

Commit

Permalink
sfc: allow asynchronous MCDI without completion function
Browse files Browse the repository at this point in the history
Signed-off-by: Bert Kenward <bkenward@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Bert Kenward authored and David S. Miller committed Aug 13, 2016
1 parent d29e33d commit 7014d7f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/ethernet/sfc/mcdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,10 @@ static bool efx_mcdi_complete_async(struct efx_mcdi_iface *mcdi, bool timeout)
efx_mcdi_display_error(efx, async->cmd, async->inlen, errbuf,
err_len, rc);
}
async->complete(efx, async->cookie, rc, outbuf, data_len);

if (async->complete)
async->complete(efx, async->cookie, rc, outbuf,
min(async->outlen, data_len));
kfree(async);

efx_mcdi_release(mcdi);
Expand Down

0 comments on commit 7014d7f

Please sign in to comment.