aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@openvz.org>2013-07-08 11:22:51 +0400
committerDavid S. Miller <davem@davemloft.net>2013-07-09 12:55:48 -0700
commite057590b05bc120732967a04d63c15f2f82cdd2b (patch)
tree37fef264841596e0796f5d286b035f4ddf7a1c90 /drivers/net
parentdd7633ecd553a5e304d349aa6f8eb8a0417098c5 (diff)
drivers/net: enic: release rtnl_lock on error-path
enic_change_mtu_work() must call rtnl_unlock() on all exiting paths. Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: Christian Benvenuti <benve@cisco.com> Cc: Roopa Prabhu <roprabhu@cisco.com> Cc: Neel Patel <neepatel@cisco.com> Cc: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/cisco/enic/enic_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index 635f55992d7..992ec2ee64d 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -1761,6 +1761,7 @@ static void enic_change_mtu_work(struct work_struct *work)
enic_synchronize_irqs(enic);
err = vnic_rq_disable(&enic->rq[0]);
if (err) {
+ rtnl_unlock();
netdev_err(netdev, "Unable to disable RQ.\n");
return;
}
@@ -1773,6 +1774,7 @@ static void enic_change_mtu_work(struct work_struct *work)
vnic_rq_fill(&enic->rq[0], enic_rq_alloc_buf);
/* Need at least one buffer on ring to get going */
if (vnic_rq_desc_used(&enic->rq[0]) == 0) {
+ rtnl_unlock();
netdev_err(netdev, "Unable to alloc receive buffers.\n");
return;
}