]> git.baikalelectronics.ru Git - kernel.git/commit
misc: rtsx: Fix an error handling path in rtsx_pci_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 15 Jun 2022 05:33:44 +0000 (07:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jun 2022 14:17:36 +0000 (16:17 +0200)
commit76f6a305e0e8b09046547b4bf5a831be118431c0
tree067595a51c5bbcba64e19300e1c16211e0e8fd80
parent685cd7aa6d95096218f0e68b7ed0321c023ddaf2
misc: rtsx: Fix an error handling path in rtsx_pci_probe()

If an error occurs after a successful idr_alloc() call, the corresponding
resource must be released with idr_remove() as already done in the .remove
function.

Update the error handling path to add the missing idr_remove() call.

Fixes: 6544dd702eaa ("mfd: Add realtek pcie card reader driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/e8dc41716cbf52fb37a12e70d8972848e69df6d6.1655271216.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/cardreader/rtsx_pcr.c