diff options
author | Jiasheng Jiang <jiasheng@iscas.ac.cn> | 2022-02-24 05:54:44 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-08 15:40:09 +0300 |
commit | 330a9b0d38e6609dc1cfe52f0b5a24c9ea71db9a (patch) | |
tree | 02affcfcd866464366d1f31cd0059d80d2723017 /drivers/memory | |
parent | 4639c1d97f385f4784f44d66a3da0672f4951ada (diff) | |
download | linux-330a9b0d38e6609dc1cfe52f0b5a24c9ea71db9a.tar.xz |
memory: emif: Add check for setup_interrupts
[ Upstream commit fd7bd80b46373887b390852f490f21b07e209498 ]
As the potential failure of the devm_request_threaded_irq(),
it should be better to check the return value of the
setup_interrupts() and return error if fails.
Fixes: 68b4aee35d1f ("memory: emif: add interrupt and temperature handling")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20220224025444.3256530-1-jiasheng@iscas.ac.cn
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/memory')
-rw-r--r-- | drivers/memory/emif.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index ddb1879f07d3..55d4c842fcd9 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -1495,7 +1495,7 @@ static int __init_or_module emif_probe(struct platform_device *pdev) { struct emif_data *emif; struct resource *res; - int irq; + int irq, ret; if (pdev->dev.of_node) emif = of_get_memory_device_details(pdev->dev.of_node, &pdev->dev); @@ -1526,7 +1526,9 @@ static int __init_or_module emif_probe(struct platform_device *pdev) emif_onetime_settings(emif); emif_debugfs_init(emif); disable_and_clear_all_interrupts(emif); - setup_interrupts(emif, irq); + ret = setup_interrupts(emif, irq); + if (ret) + goto error; /* One-time actions taken on probing the first device */ if (!emif1) { |