* [PATCH] mmc: davinci: remove incorrect NO_IRQ use
@ 2016-09-06 12:56 Arnd Bergmann
2016-09-09 9:46 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2016-09-06 12:56 UTC (permalink / raw)
To: Ulf Hansson
Cc: Arnd Bergmann, David Lechner, Peter Ujfalusi, Jaehoon Chung,
linux-mmc, linux-kernel
platform_get_irq() returns an error value on failure, not NO_IRQ,
so the error handling here could never work.
This changes the code to propagate the error value instead.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/mmc/host/davinci_mmc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index c521559412fc..67ef4810b3de 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -1216,9 +1216,11 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
}
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- irq = platform_get_irq(pdev, 0);
- if (!r || irq == NO_IRQ)
+ if (!r)
return -ENODEV;
+ irq = platform_get_irq(pdev, 0);
+ if (irq < 0)
+ return irq;
mem_size = resource_size(r);
mem = devm_request_mem_region(&pdev->dev, r->start, mem_size,
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: davinci: remove incorrect NO_IRQ use
2016-09-06 12:56 [PATCH] mmc: davinci: remove incorrect NO_IRQ use Arnd Bergmann
@ 2016-09-09 9:46 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2016-09-09 9:46 UTC (permalink / raw)
To: Arnd Bergmann
Cc: David Lechner, Peter Ujfalusi, Jaehoon Chung, linux-mmc, linux-kernel
On 6 September 2016 at 14:56, Arnd Bergmann <arnd@arndb.de> wrote:
> platform_get_irq() returns an error value on failure, not NO_IRQ,
> so the error handling here could never work.
>
> This changes the code to propagate the error value instead.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks, applied for next!
Kind regards
Uffe
> ---
> drivers/mmc/host/davinci_mmc.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
> index c521559412fc..67ef4810b3de 100644
> --- a/drivers/mmc/host/davinci_mmc.c
> +++ b/drivers/mmc/host/davinci_mmc.c
> @@ -1216,9 +1216,11 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
> }
>
> r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - irq = platform_get_irq(pdev, 0);
> - if (!r || irq == NO_IRQ)
> + if (!r)
> return -ENODEV;
> + irq = platform_get_irq(pdev, 0);
> + if (irq < 0)
> + return irq;
>
> mem_size = resource_size(r);
> mem = devm_request_mem_region(&pdev->dev, r->start, mem_size,
> --
> 2.9.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-09 9:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-06 12:56 [PATCH] mmc: davinci: remove incorrect NO_IRQ use Arnd Bergmann
2016-09-09 9:46 ` Ulf Hansson
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).