diff options
author | Pavel Belous <pavel.belous@aquantia.com> | 2017-02-20 14:36:44 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-20 17:11:09 -0500 |
commit | d5919aeba1cc7a2b90210256d617625fceaf4e06 (patch) | |
tree | 6173e84ab7208cf2ed51dec3daaf9a79a80675f3 | |
parent | 362f37b28ba52115be9b30134375b199ac612df4 (diff) |
net: ethernet: aquantia: Fixed missing rtnl_unlock.
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>
-rw-r--r-- | drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 5 |
1 files 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) | |||
932 | 932 | ||
933 | if (!netif_running(self->ndev)) { | 933 | if (!netif_running(self->ndev)) { |
934 | err = 0; | 934 | err = 0; |
935 | goto err_exit; | 935 | goto out; |
936 | } | 936 | } |
937 | rtnl_lock(); | 937 | rtnl_lock(); |
938 | if (pm_msg->event & PM_EVENT_SLEEP || pm_msg->event & PM_EVENT_FREEZE) { | 938 | 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) | |||
957 | netif_device_attach(self->ndev); | 957 | netif_device_attach(self->ndev); |
958 | netif_tx_start_all_queues(self->ndev); | 958 | netif_tx_start_all_queues(self->ndev); |
959 | } | 959 | } |
960 | rtnl_unlock(); | ||
961 | 960 | ||
962 | err_exit: | 961 | err_exit: |
962 | rtnl_unlock(); | ||
963 | out: | ||
963 | return err; | 964 | return err; |
964 | } | 965 | } |