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>
 
        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) {
                netif_device_attach(self->ndev);
                netif_tx_start_all_queues(self->ndev);
        }
-       rtnl_unlock();
 
 err_exit:
+       rtnl_unlock();
+out:
        return err;
 }