aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-07-02 18:03:02 -0400
committerBen Hutchings <bhutchings@solarflare.com>2012-07-17 11:12:32 -0400
commite3ed2bdfc4a5dcdcdf74141e88af9990dc141a4b (patch)
tree8f13ed6c43d8e81911f451e9c6012ceb14e2d330 /drivers/net/ethernet/sfc
parenta4ed2d4cd96dd71b0f2e04a88f83abcab6ddd023 (diff)
sfc: Use dev_kfree_skb() in efx_end_loopback()
Fix CID 102619 in the Coverity report on Linux. efx_end_loopback() iterates over an array of skb pointers of which some may be null (if efx_begin_loopback() failed). It should not use dev_kfree_skb_irq(), which requires non-null pointers. In practice this is safe because it does not run in interrupt context and therefore always ends up calling dev_kfree_skb(), which does allow null pointers. But we should make that explicit. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r--drivers/net/ethernet/sfc/selftest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/selftest.c b/drivers/net/ethernet/sfc/selftest.c
index de4c0069f5b2..ccc428fc267b 100644
--- a/drivers/net/ethernet/sfc/selftest.c
+++ b/drivers/net/ethernet/sfc/selftest.c
@@ -488,7 +488,7 @@ static int efx_end_loopback(struct efx_tx_queue *tx_queue,
488 skb = state->skbs[i]; 488 skb = state->skbs[i];
489 if (skb && !skb_shared(skb)) 489 if (skb && !skb_shared(skb))
490 ++tx_done; 490 ++tx_done;
491 dev_kfree_skb_any(skb); 491 dev_kfree_skb(skb);
492 } 492 }
493 493
494 netif_tx_unlock_bh(efx->net_dev); 494 netif_tx_unlock_bh(efx->net_dev);