DORMANTno replies

[PATCH] mlx4: Remove redundant NULL check before kfree

From: Syam Sidhardhan <hidden>
Date: 2013-02-24 23:20:05
Subsystem: infiniband subsystem, mellanox mlx4 ib driver, the rest · Maintainers: Jason Gunthorpe, Leon Romanovsky, Yishai Hadas, Linus Torvalds

kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <redacted>
---
 drivers/infiniband/hw/mlx4/main.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index e7d81c0..3fdd1c1 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -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;
 }
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help