Skip to content

Commit

Permalink
NET: bna, fix lock imbalance
Browse files Browse the repository at this point in the history
bnad_set_rx_mode omit to unlock bna_lock on one fail path. Fix that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Debashis Dutt <ddutt@brocade.com>
Cc: Rasesh Mody <rmody@brocade.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Slaby authored and David S. Miller committed Sep 7, 2010
1 parent e8f7f43 commit ca1cef3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/bna/bnad.c
Original file line number Diff line number Diff line change
Expand Up @@ -2702,7 +2702,7 @@ bnad_set_rx_mode(struct net_device *netdev)
kzalloc((mc_count + 1) * ETH_ALEN,
GFP_ATOMIC);
if (!mcaddr_list)
return;
goto unlock;

memcpy(&mcaddr_list[0], &bnad_bcast_addr[0], ETH_ALEN);

Expand All @@ -2715,6 +2715,7 @@ bnad_set_rx_mode(struct net_device *netdev)
/* Should we enable BNAD_CF_ALLMULTI for err != 0 ? */
kfree(mcaddr_list);
}
unlock:
spin_unlock_irqrestore(&bnad->bna_lock, flags);
}

Expand Down

0 comments on commit ca1cef3

Please sign in to comment.