Skip to content
Commit a39a98ff authored by Maninder Singh's avatar Maninder Singh Committed by Doug Ledford
Browse files

IB/mlx4: Optimize freeing of items on error unwind



On failure, we loop through all possible pointers and test them before
calling kfree.  But really, why even attempt to free items we didn't
allocate when we can easily loop through exactly and only the devices
for which the original memory allocation succeeded and free just those.

Signed-off-by: default avatarManinder Singh <maninder1.s@samsung.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 43bfb972
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment