diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-02-04 13:17:48 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-05 00:26:23 -0800 |
commit | de7017625e8b642506b7e56574353cc9695ca357 (patch) | |
tree | f64df03a0c459ac421139fa7ef3e15b7b05d07f1 /drivers/net/ethernet/qlogic/netxen | |
parent | 1b4b32c6b88b3a0985b9448f52b3a58021de5653 (diff) | |
download | blackbird-obmc-linux-de7017625e8b642506b7e56574353cc9695ca357.tar.gz blackbird-obmc-linux-de7017625e8b642506b7e56574353cc9695ca357.zip |
netxen: Delete an unnecessary check before the function call "kfree"
The kfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/netxen')
-rw-r--r-- | drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c index afb8efb25781..e0c31e3947d1 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c @@ -176,9 +176,7 @@ netxen_alloc_sds_rings(struct netxen_recv_context *recv_ctx, int count) static void netxen_free_sds_rings(struct netxen_recv_context *recv_ctx) { - if (recv_ctx->sds_rings != NULL) - kfree(recv_ctx->sds_rings); - + kfree(recv_ctx->sds_rings); recv_ctx->sds_rings = NULL; } |