* [PATCH] mfd: fix tests for platform_get_irq() failure
@ 2022-08-25 1:09 Yu Zhe
2022-09-08 8:21 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Yu Zhe @ 2022-08-25 1:09 UTC (permalink / raw)
To: lee, shawnguo, s.hauer, kernel, festevam, linux-imx
Cc: linux-arm-kernel, linux-kernel, liqiong, Yu Zhe
The platform_get_irq() returns negative error codes. It can't actually
return zero.
Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
---
drivers/mfd/fsl-imx25-tsadc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/fsl-imx25-tsadc.c b/drivers/mfd/fsl-imx25-tsadc.c
index 37e5e02a1d05..8ccdfd73e694 100644
--- a/drivers/mfd/fsl-imx25-tsadc.c
+++ b/drivers/mfd/fsl-imx25-tsadc.c
@@ -179,7 +179,7 @@ static int mx25_tsadc_remove(struct platform_device *pdev)
struct mx25_tsadc *tsadc = platform_get_drvdata(pdev);
int irq = platform_get_irq(pdev, 0);
- if (irq) {
+ if (irq > 0) {
irq_set_chained_handler_and_data(irq, NULL, NULL);
irq_domain_remove(tsadc->domain);
}
--
2.11.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mfd: fix tests for platform_get_irq() failure
2022-08-25 1:09 [PATCH] mfd: fix tests for platform_get_irq() failure Yu Zhe
@ 2022-09-08 8:21 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2022-09-08 8:21 UTC (permalink / raw)
To: Yu Zhe
Cc: shawnguo, s.hauer, kernel, festevam, linux-imx, linux-arm-kernel,
linux-kernel, liqiong
On Thu, 25 Aug 2022, Yu Zhe wrote:
> The platform_get_irq() returns negative error codes. It can't actually
> return zero.
>
> Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
> ---
> drivers/mfd/fsl-imx25-tsadc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Already fixed: https://lore.kernel.org/r/YvTfkbVQWYKMKS/t@kili
> diff --git a/drivers/mfd/fsl-imx25-tsadc.c b/drivers/mfd/fsl-imx25-tsadc.c
> index 37e5e02a1d05..8ccdfd73e694 100644
> --- a/drivers/mfd/fsl-imx25-tsadc.c
> +++ b/drivers/mfd/fsl-imx25-tsadc.c
> @@ -179,7 +179,7 @@ static int mx25_tsadc_remove(struct platform_device *pdev)
> struct mx25_tsadc *tsadc = platform_get_drvdata(pdev);
> int irq = platform_get_irq(pdev, 0);
>
> - if (irq) {
> + if (irq > 0) {
> irq_set_chained_handler_and_data(irq, NULL, NULL);
> irq_domain_remove(tsadc->domain);
> }
--
Lee Jones [李琼斯]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-08 8:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-25 1:09 [PATCH] mfd: fix tests for platform_get_irq() failure Yu Zhe
2022-09-08 8:21 ` 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).