]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/rpmsg.git/commitdiff
drivers/net: enic: release rtnl_lock on error-path
authorKonstantin Khlebnikov <khlebnikov@openvz.org>
Mon, 8 Jul 2013 07:22:51 +0000 (11:22 +0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Jul 2013 19:55:48 +0000 (12:55 -0700)
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>
drivers/net/ethernet/cisco/enic/enic_main.c

index 635f55992d7e8f2788a5411974e448d7af20f3ec..992ec2ee64d919333ec1c28151a9a3acd52d25e0 100644 (file)
@@ -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;
        }