linux-stable/drivers/memory
Dongliang Mu eeda1315a3 memory: fsl_ifc: fix leak of irq and nand_irq in fsl_ifc_ctrl_probe
[ Upstream commit 4ed2f3545c ]

The error handling code of fsl_ifc_ctrl_probe is problematic. When
fsl_ifc_ctrl_init fails or request_irq of fsl_ifc_ctrl_dev->irq fails,
it forgets to free the irq and nand_irq. Meanwhile, if request_irq of
fsl_ifc_ctrl_dev->nand_irq fails, it will still free nand_irq even if
the request_irq is not successful.

Fix this by refactoring the error handling code.

Fixes: d2ae2e20fb ("driver/memory:Move Freescale IFC driver to a common driver")
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Link: https://lore.kernel.org/r/20210925151434.8170-1-mudongliangabcd@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-26 11:40:33 +01:00
..
samsung
tegra
atmel-ebi.c memory: atmel-ebi: add missing of_node_put for loop iteration 2021-07-20 16:17:54 +02:00
atmel-sdramc.c
da8xx-ddrctl.c
emif.c memory: emif: Remove bogus debugfs error handling 2020-11-05 11:06:57 +01:00
emif.h
fsl-corenet-cf.c
fsl_ifc.c memory: fsl_ifc: fix leak of irq and nand_irq in fsl_ifc_ctrl_probe 2021-11-26 11:40:33 +01:00
jz4780-nemc.c
Kconfig
Makefile
mtk-smi.c
mvebu-devbus.c
of_memory.c
of_memory.h
omap-gpmc.c memory: gpmc: fix out of bounds read and dereference on gpmc_cs[] 2021-05-22 10:57:26 +02:00
pl172.c
tegra20-mc.c
ti-aemif.c