]> git.itanic.dy.fi Git - linux-stable/commit
forcedeth: Fix an error handling path in nv_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 20 May 2023 08:30:17 +0000 (10:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 May 2023 12:55:33 +0000 (13:55 +0100)
commitd5ab5447d91015b27a084418eec958771a2460b1
tree706505abde026768b360baf1fec791d1f8d656e0
parentae7c4ec4265504bf5cb82299fe5f3492467e7ad7
forcedeth: Fix an error handling path in nv_probe()

commit 5b17a4971d3b2a073f4078dd65331efbe35baa2d upstream.

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: cac1c52c3621 ("forcedeth: mgmt unit interface")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Zhu Yanjun <zyjzyj2000@gmail.com>
Link: https://lore.kernel.org/r/355e9a7d351b32ad897251b6f81b5886fcdc6766.1684571393.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/nvidia/forcedeth.c