linux-stable/drivers/memory
Dongliang Mu b52958eb22 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:48:37 +01:00
..
samsung
tegra memory: tegra: Fix integer overflow on tick value calculation 2019-05-25 18:26:49 +02:00
atmel-ebi.c
atmel-sdramc.c
emif.c memory: emif: Remove bogus debugfs error handling 2020-11-10 10:23:55 +01:00
emif.h
fsl-corenet-cf.c memory: fsl-corenet-cf: Fix handling of platform_get_irq() error 2020-10-29 09:05:40 +01:00
fsl_ifc.c memory: fsl_ifc: fix leak of irq and nand_irq in fsl_ifc_ctrl_probe 2021-11-26 11:48:37 +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:40:22 +02:00
pl172.c
tegra20-mc.c
ti-aemif.c