linux-stable/drivers/memory
Dongliang Mu 20cc0fa1d0 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-18 14:04:16 +01:00
..
samsung memory: samsung: exynos5422-dmc: handle clk_set_parent() failure 2021-05-14 09:50:19 +02:00
tegra memory: tegra: Fix compilation warnings on 64bit platforms 2021-07-25 14:36:14 +02:00
.gitignore
atmel-ebi.c memory: atmel-ebi: add missing of_node_put for loop iteration 2021-07-20 16:05:54 +02:00
atmel-sdramc.c
brcmstb_dpfe.c memory: brcmstb_dpfe: Simplify with dev_err_probe() 2020-09-02 17:22:31 +02:00
bt1-l2-ctl.c memory: bt1-l2-ctl: Add blank lines after declarations 2020-07-27 11:13:33 +02:00
da8xx-ddrctl.c memory: da8xx-ddrctl: Remove unused 'node' variable 2020-07-24 16:18:32 +02:00
emif-asm-offsets.c memory: emif-asm-offsets: Add GPLv2 SPDX license header 2020-07-24 16:18:32 +02:00
emif.c memory: emif: Convert to DEFINE_SHOW_ATTRIBUTE 2020-09-20 18:59:19 +02:00
emif.h
fsl-corenet-cf.c memory: fsl-corenet-cf: Fix handling of platform_get_irq() error 2020-09-02 17:32:02 +02:00
fsl_ifc.c memory: fsl_ifc: fix leak of irq and nand_irq in fsl_ifc_ctrl_probe 2021-11-18 14:04:16 +01:00
jedec_ddr.h
jedec_ddr_data.c
jz4780-nemc.c memory: jz4780_nemc: Fix an error pointer vs NULL check in probe() 2020-12-30 11:54:27 +01:00
Kconfig memory: ti-emif-sram: only build for ARMv7 2020-12-30 11:53:37 +01:00
Makefile memory: brcmstb_dpfe: add separate entry for compile test 2020-08-17 20:44:00 +02:00
mtk-smi.c memory: mtk-smi: Fix PM usage counter unbalance in mtk_smi ops 2021-03-04 11:37:22 +01:00
mvebu-devbus.c memory: mvebu-devbus: Align with open parenthesis 2020-07-27 11:13:33 +02:00
of_memory.c memory: of: Correct kerneldoc 2020-07-27 11:13:33 +02:00
of_memory.h memory: of: Remove unneeded extern from function declarations 2020-07-24 16:18:32 +02:00
omap-gpmc.c memory: gpmc: fix out of bounds read and dereference on gpmc_cs[] 2021-05-14 09:50:06 +02:00
pl172.c memory: pl172: Enclose macro argument usage in parenthesis 2020-07-27 11:13:33 +02:00
pl353-smc.c memory: pl353: Fix error return code in pl353_smc_probe() 2021-07-20 16:05:54 +02:00
renesas-rpc-if.c memory: renesas-rpc-if: Correct QSPI data transfer in Manual mode 2021-11-18 14:03:47 +01:00
stm32-fmc2-ebi.c memory: stm32-fmc2-ebi: add missing of_node_put for loop iteration 2021-07-20 16:05:54 +02:00
ti-aemif.c memory: ti-aemif: Drop child node when jumping out loop 2021-03-04 11:37:25 +01:00
ti-emif-pm.c memory: ti-emif-pm: Fix cast to iomem pointer 2020-07-24 16:18:32 +02:00
ti-emif-sram-pm.S