Skip to content

Commit

Permalink
IB/mlx4: Remove redundant NULL check before kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Syam Sidhardhan authored and Roland Dreier committed Feb 25, 2013
1 parent 57d88cf commit c89d127
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/infiniband/hw/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c89d127

Please sign in to comment.