]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
misc: alcor_pci: Fix an error handling path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 6 Feb 2022 08:39:54 +0000 (09:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:06:21 +0000 (14:06 +0200)
commit4066c612f842903fdb7cc8b75331c3c1a87cdf85
tree8d12c43c7c98f60f25ff3a6e9e2e928d7267d093
parentb5596995211c3241c1c68e1240a58c86597be8ed
misc: alcor_pci: Fix an error handling path

[ Upstream commit 5b3dc949f554379edcb8ef6111aa5ecb78feb798 ]

A successful ida_simple_get() should be balanced by a corresponding
ida_simple_remove().

Add the missing call in the error handling path of the probe.

While at it, switch to ida_alloc()/ida_free() instead to
ida_simple_get()/ida_simple_remove().
The latter is deprecated and more verbose.

Fixes: 4f556bc04e3c ("misc: cardreader: add new Alcor Micro Cardreader PCI driver")
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/918a9875b7f67b7f8f123c4446452603422e8c5e.1644136776.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/misc/cardreader/alcor_pci.c