Skip to contentSkip to conversation

mlx4: Remove redundant NULL check before kfree

PATCH In review Syam Sidhardhan 2 participants 2 messages Feb 24, 2013 – Feb 25, 2013 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mlx4: Remove redundant NULL check before kfree

kfree on NULL pointer is a no-op.

---
 drivers/infiniband/hw/mlx4/main.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/infiniband/hw/mlx4/main.c +1 -2
index e7d81c0..3fdd1c1 100644
@@ -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;
 }
 
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1361748005-29705-1-git-send-email-s.syam-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org