net/mlx4_core: Fixed memory leak and incorrect refcount in mlx4_load_one
authorMatan Barak <matanb@mellanox.com>
Sun, 14 Dec 2014 14:18:04 +0000 (16:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Dec 2014 16:34:53 +0000 (11:34 -0500)
The current mlx4_load_one has a memory leak as it always allocates
dev_cap, but frees it only on error.

In addition, even if VFs exist when mlx4_load_one is called,
we still need to notify probed VFs that we're loading (by
incrementing pf_loading).

Fixes: a0eacca948d2 ('net/mlx4_core: Refactor mlx4_load_one')
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found