Skip to content

Commit 59929fb

Browse files
emuslndavem330
authored andcommitted
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: 0925e9d ("ionic: use mutex to protect queue operations") Reported-by: kernel test robot <[email protected]> Reported-by: Julia Lawall <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 51875da commit 59929fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/pensando/ionic/ionic_lif.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2001,7 +2001,7 @@ int ionic_reset_queues(struct ionic_lif *lif, ionic_reset_cb cb, void *arg)
20012001
netif_device_detach(lif->netdev);
20022002
err = ionic_stop(lif->netdev);
20032003
if (err)
2004-
return err;
2004+
goto reset_out;
20052005
}
20062006

20072007
if (cb)
@@ -2011,6 +2011,8 @@ int ionic_reset_queues(struct ionic_lif *lif, ionic_reset_cb cb, void *arg)
20112011
err = ionic_open(lif->netdev);
20122012
netif_device_attach(lif->netdev);
20132013
}
2014+
2015+
reset_out:
20142016
mutex_unlock(&lif->queue_lock);
20152017

20162018
return err;

0 commit comments

Comments
 (0)