diff options
author | Gustavo A. R. Silva <garsilva@embeddedor.com> | 2017-10-17 13:59:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-19 13:27:54 +0100 |
commit | b14bec89042ee6f9a43b437f8133cfcbea140f20 (patch) | |
tree | a6f69db35b0afe87f9a32d1dcbf99a20f0482939 /drivers/net/ethernet/cavium | |
parent | ac79a512b6fd5831a12859fd1d3c5e38103bcaeb (diff) | |
download | linux-b14bec89042ee6f9a43b437f8133cfcbea140f20.tar.bz2 |
liquidio: remove unnecessary NULL check before kfree in delete_glists
NULL check before freeing functions like kfree is not needed.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium')
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c index 2e993ce43b66..e4a112cf4f8e 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c @@ -435,8 +435,7 @@ static void delete_glists(struct lio *lio) do { g = (struct octnic_gather *) list_delete_head(&lio->glist[i]); - if (g) - kfree(g); + kfree(g); } while (g); if (lio->glists_virt_base && lio->glists_virt_base[i] && |