* [PATCH] mfd: mt6397: Do not call irq_domain_remove if PMIC unsupported
@ 2018-10-22 2:55 Nicolas Boichat
2018-10-25 9:10 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Boichat @ 2018-10-22 2:55 UTC (permalink / raw)
To: Lee Jones ); +Cc: linux-kernel, linux-mediatek
If the PMIC ID is unknown, the current code would call
irq_domain_remove and panic, as pmic->irq_domain is only
initialized by mt6397_irq_init.
Return immediately with an error, if the chip ID is unsupported.
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
---
drivers/mfd/mt6397-core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index 77b64bd64df36a..ab24e176ef4487 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -329,8 +329,7 @@ static int mt6397_probe(struct platform_device *pdev)
default:
dev_err(&pdev->dev, "unsupported chip: %d\n", id);
- ret = -ENODEV;
- break;
+ return -ENODEV;
}
if (ret) {
--
2.19.1.568.g152ad8e336-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mfd: mt6397: Do not call irq_domain_remove if PMIC unsupported
2018-10-22 2:55 [PATCH] mfd: mt6397: Do not call irq_domain_remove if PMIC unsupported Nicolas Boichat
@ 2018-10-25 9:10 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2018-10-25 9:10 UTC (permalink / raw)
To: Nicolas Boichat; +Cc: linux-kernel, linux-mediatek
On Mon, 22 Oct 2018, Nicolas Boichat wrote:
> If the PMIC ID is unknown, the current code would call
> irq_domain_remove and panic, as pmic->irq_domain is only
> initialized by mt6397_irq_init.
>
> Return immediately with an error, if the chip ID is unsupported.
>
> Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
> ---
> drivers/mfd/mt6397-core.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Applied for v4.21, thanks.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-25 9:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-22 2:55 [PATCH] mfd: mt6397: Do not call irq_domain_remove if PMIC unsupported Nicolas Boichat
2018-10-25 9:10 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).