diff options
author | Bert Kenward <bkenward@solarflare.com> | 2016-08-11 12:01:21 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-13 03:42:19 (GMT) |
commit | 7014d7f672f7dc180d1386239c4f0c455e405ed9 (patch) | |
tree | 2fa8c6dbb677e0d2a940bd71b4386733a0b027b8 | |
parent | d29e33d6d087ef66a70f94791504579366cf3d09 (diff) | |
download | linux-7014d7f672f7dc180d1386239c4f0c455e405ed9.tar.xz |
sfc: allow asynchronous MCDI without completion function
Signed-off-by: Bert Kenward <bkenward@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/sfc/mcdi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c index d28e7dd..9fbc12a 100644 --- a/drivers/net/ethernet/sfc/mcdi.c +++ b/drivers/net/ethernet/sfc/mcdi.c @@ -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); |