[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <59fe3c6a-0483-995b-3c33-5e3afb4ed501@solarflare.com>
Date: Thu, 11 Aug 2016 13:01:21 +0100
From: Bert Kenward <bkenward@...arflare.com>
To: Dave Miller <davem@...emloft.net>
CC: <netdev@...r.kernel.org>,
linux-net-drivers <linux-net-drivers@...arflare.com>
Subject: [PATCH net-next 2/6] sfc: allow asynchronous MCDI without completion
function
Signed-off-by: Bert Kenward <bkenward@...arflare.com>
---
drivers/net/ethernet/sfc/mcdi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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);
--
2.7.4
Powered by blists - more mailing lists