commit | a39a98ff4cc8b514fe6fa551f6ed59cd60e07da2 | [log] [tgz] |
---|---|---|
author | Maninder Singh <maninder1.s@samsung.com> | Wed Jul 08 09:43:35 2015 +0530 |
committer | Doug Ledford <dledford@redhat.com> | Tue Jul 14 13:20:14 2015 -0400 |
tree | a863a36fb8f1a4f0a769d5a72dc781468d3bc9ad | |
parent | 43bfb9729ea88d46e3f4d3ad7b17106c7b071fcb [diff] |
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: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Doug Ledford <dledford@redhat.com>