Commit 59929fbb authored by Shannon Nelson's avatar Shannon Nelson Committed by David S. Miller

ionic: unlock queue mutex in error path

On an error return, jump to the unlock at the end to be sure
to unlock the queue_lock mutex.

Fixes: 0925e9db ("ionic: use mutex to protect queue operations")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 51875dad
...@@ -2001,7 +2001,7 @@ int ionic_reset_queues(struct ionic_lif *lif, ionic_reset_cb cb, void *arg) ...@@ -2001,7 +2001,7 @@ int ionic_reset_queues(struct ionic_lif *lif, ionic_reset_cb cb, void *arg)
netif_device_detach(lif->netdev); netif_device_detach(lif->netdev);
err = ionic_stop(lif->netdev); err = ionic_stop(lif->netdev);
if (err) if (err)
return err; goto reset_out;
} }
if (cb) if (cb)
...@@ -2011,6 +2011,8 @@ int ionic_reset_queues(struct ionic_lif *lif, ionic_reset_cb cb, void *arg) ...@@ -2011,6 +2011,8 @@ int ionic_reset_queues(struct ionic_lif *lif, ionic_reset_cb cb, void *arg)
err = ionic_open(lif->netdev); err = ionic_open(lif->netdev);
netif_device_attach(lif->netdev); netif_device_attach(lif->netdev);
} }
reset_out:
mutex_unlock(&lif->queue_lock); mutex_unlock(&lif->queue_lock);
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment