]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net: ethernet: aquantia: Fixed missing rtnl_unlock.
authorPavel Belous <pavel.belous@aquantia.com>
Mon, 20 Feb 2017 19:36:44 +0000 (22:36 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Feb 2017 22:11:09 +0000 (17:11 -0500)
rtnl_unlock should be called if error occurred.

Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Reviewed-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/aq_nic.c

index 4b8d074a84509faba705dcfee3dd42848d8d477b..646314c6f237ab96849a6988776d4ca1ad72bd78 100644 (file)
@@ -932,7 +932,7 @@ int aq_nic_change_pm_state(struct aq_nic_s *self, pm_message_t *pm_msg)
 
        if (!netif_running(self->ndev)) {
                err = 0;
-               goto err_exit;
+               goto out;
        }
        rtnl_lock();
        if (pm_msg->event & PM_EVENT_SLEEP || pm_msg->event & PM_EVENT_FREEZE) {
@@ -957,8 +957,9 @@ int aq_nic_change_pm_state(struct aq_nic_s *self, pm_message_t *pm_msg)
                netif_device_attach(self->ndev);
                netif_tx_start_all_queues(self->ndev);
        }
-       rtnl_unlock();
 
 err_exit:
+       rtnl_unlock();
+out:
        return err;
 }