From: Jack Morgenstein Date: Thu, 10 May 2012 20:28:09 +0000 (+0300) Subject: IB/mlx4: Fix mlx4_ib_add() error flow X-Git-Tag: v3.5-rc1~171^2^6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=035b1032b57635e0b6015aed47dcb43c01e4ce7f;p=pandora-kernel.git IB/mlx4: Fix mlx4_ib_add() error flow We need to use a different loop index for mlx4_counter_alloc() and for device_create_file() iterations: the mlx4_counter_alloc() loop index is used in the error flow to free counters. If the same loop index is used for device_create_file() and, say, the device_create_file() loop fails on the first iteration, the allocated counters will not be freed. Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier --- Reading git-diff-tree failed