net/mlx4: Handle return codes in mlx4_qp_attach_common
authorRobb Manes <rmanes@redhat.com>
Tue, 29 Sep 2015 15:03:37 +0000 (11:03 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Sep 2015 04:14:01 +0000 (21:14 -0700)
commit23860f103b53e764a3cbbf615d08f88362a28295
tree053317bd0077afb798f3b694c2ac0e416a5b774b
parentc047a1f918af75e572a19ba0581c3e3e202ed698
net/mlx4: Handle return codes in mlx4_qp_attach_common

Both new_steering_entry() and existing_steering_entry() return values
based on their success or failure, but currently they fall through
silently.  This can make troubleshooting difficult, as we were unable
to tell which one of these two functions returned errors or
specifically what code was returned.  This patch remedies that
situation by passing the return codes to err, which is returned by
mlx4_qp_attach_common() itself.

This also addresses a leak in the call to mlx4_bitmap_free() as well.

Signed-off-by: Robb Manes <rmanes@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/mcg.c