IB/mlx4: Remove redundant NULL check before kfree
authorSyam Sidhardhan <syamsidhardh@gmail.com>
Sun, 24 Feb 2013 23:20:05 +0000 (23:20 +0000)
committerRoland Dreier <roland@purestorage.com>
Mon, 25 Feb 2013 17:24:32 +0000 (09:24 -0800)
kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx4/main.c

index e7d81c0d1ac59ad94b9172b429a2c186d4ee2b23..3fdd1c17cef73bd0dd5dcd5a8ee5084dde252694 100644 (file)
@@ -1601,8 +1601,7 @@ static void do_slave_init(struct mlx4_ib_dev *ibdev, int slave, int do_init)
                spin_unlock_irqrestore(&ibdev->sriov.going_down_lock, flags);
        }
 out:
-       if (dm)
-               kfree(dm);
+       kfree(dm);
        return;
 }