drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c: remove null test before kfree
authorFabian Frederick <fabf@skynet.be>
Tue, 17 Jun 2014 19:32:53 +0000 (21:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Jun 2014 04:26:07 +0000 (21:26 -0700)
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Ariel Elior <ariele@broadcom.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c

index eda8583f6fc0506c2c4d64fa1f7737645b36e277..c9988e3bfe2bacbfb330ae39f001ccf8777f2202 100644 (file)
@@ -597,8 +597,7 @@ int bnx2x_vf_mcast(struct bnx2x *bp, struct bnx2x_virtf *vf,
        rc = bnx2x_config_mcast(bp, &mcast, BNX2X_MCAST_CMD_DEL);
        if (rc) {
                BNX2X_ERR("Failed to remove multicasts\n");
-               if (mc)
-                       kfree(mc);
+               kfree(mc);
                return rc;
        }