From d5919aeba1cc7a2b90210256d617625fceaf4e06 Mon Sep 17 00:00:00 2001 From: Pavel Belous Date: Mon, 20 Feb 2017 22:36:44 +0300 Subject: [PATCH] net: ethernet: aquantia: Fixed missing rtnl_unlock. rtnl_unlock should be called if error occurred. Signed-off-by: Pavel Belous Reviewed-by: Lino Sanfilippo Signed-off-by: David S. Miller --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c index 4b8d074a8450..646314c6f237 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c @@ -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; }