Skip to content

Commit 5b17a49

Browse files
tititiou36kuba-moo
authored andcommitted
forcedeth: Fix an error handling path in nv_probe()
If an error occures after calling nv_mgmt_acquire_sema(), it should be undone with a corresponding nv_mgmt_release_sema() call. Add it in the error handling path of the probe as already done in the remove function. Fixes: cac1c52 ("forcedeth: mgmt unit interface") Signed-off-by: Christophe JAILLET <[email protected]> Acked-by: Zhu Yanjun <[email protected]> Link: https://lore.kernel.org/r/355e9a7d351b32ad897251b6f81b5886fcdc6766.1684571393.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 6ca328e commit 5b17a49

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/nvidia/forcedeth.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6138,6 +6138,7 @@ static int nv_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
61386138
return 0;
61396139

61406140
out_error:
6141+
nv_mgmt_release_sema(dev);
61416142
if (phystate_orig)
61426143
writel(phystate|NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl);
61436144
out_freering:

0 commit comments

Comments
 (0)