net/mlx4_core: Fix potential corruption in counters database
authorEran Ben Elisha <eranbe@mellanox.com>
Wed, 17 Feb 2016 15:24:24 +0000 (17:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Feb 2016 15:29:26 +0000 (10:29 -0500)
commit6b94bab0ee8d5def6a2aac0ef6204ee6e24386b6
treeba737a483be69af809505f4d95d4bc440292f02a
parent31c128b66e5b28f468076e4f3ca3025c35342041
net/mlx4_core: Fix potential corruption in counters database

The error flow in procedure handle_existing_counter() is wrong.

The procedure should exit after encountering the error, not continue
as if everything is OK.

Fixes: 68230242cdbc ('net/mlx4_core: Add port attribute when tracking counters')
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c