* [PATCH 2/2] EDAC/ti: Fix handling of platform_get_irq() error
2020-08-27 7:07 ` [PATCH 1/2] EDAC/aspeed: Fix handling of platform_get_irq() error Krzysztof Kozlowski
@ 2020-08-27 7:07 ` Krzysztof Kozlowski
2020-08-27 7:13 ` Tero Kristo
2020-08-27 23:49 ` [PATCH 1/2] EDAC/aspeed: " Stefan Schaeckeler
2020-09-01 18:51 ` Borislav Petkov
2 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-27 7:07 UTC (permalink / raw)
To: Stefan Schaeckeler, Borislav Petkov, Mauro Carvalho Chehab,
Tony Luck, James Morse, Robert Richter, Joel Stanley,
Andrew Jeffery, Tero Kristo, linux-edac, linux-arm-kernel,
linux-aspeed, linux-kernel
Cc: Krzysztof Kozlowski
platform_get_irq() returns -ERRNO on error. In such case comparison
to 0 would pass the check.
Fixes: 86a18ee21e5e ("EDAC, ti: Add support for TI keystone and DRA7xx EDAC")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/edac/ti_edac.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/edac/ti_edac.c b/drivers/edac/ti_edac.c
index 6e52796a0b41..e7eae20f83d1 100644
--- a/drivers/edac/ti_edac.c
+++ b/drivers/edac/ti_edac.c
@@ -278,7 +278,8 @@ static int ti_edac_probe(struct platform_device *pdev)
/* add EMIF ECC error handler */
error_irq = platform_get_irq(pdev, 0);
- if (!error_irq) {
+ if (error_irq < 0) {
+ ret = error_irq;
edac_printk(KERN_ERR, EDAC_MOD_NAME,
"EMIF irq number not defined.\n");
goto err;
--
2.17.1
_______________________________________________
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] 5+ messages in thread* Re: [PATCH 2/2] EDAC/ti: Fix handling of platform_get_irq() error
2020-08-27 7:07 ` [PATCH 2/2] EDAC/ti: " Krzysztof Kozlowski
@ 2020-08-27 7:13 ` Tero Kristo
0 siblings, 0 replies; 5+ messages in thread
From: Tero Kristo @ 2020-08-27 7:13 UTC (permalink / raw)
To: Krzysztof Kozlowski, Stefan Schaeckeler, Borislav Petkov,
Mauro Carvalho Chehab, Tony Luck, James Morse, Robert Richter,
Joel Stanley, Andrew Jeffery, linux-edac, linux-arm-kernel,
linux-aspeed, linux-kernel
On 27/08/2020 10:07, Krzysztof Kozlowski wrote:
> platform_get_irq() returns -ERRNO on error. In such case comparison
> to 0 would pass the check.
>
> Fixes: 86a18ee21e5e ("EDAC, ti: Add support for TI keystone and DRA7xx EDAC")
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Tero Kristo <t-kristo@ti.com>
> ---
> drivers/edac/ti_edac.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/edac/ti_edac.c b/drivers/edac/ti_edac.c
> index 6e52796a0b41..e7eae20f83d1 100644
> --- a/drivers/edac/ti_edac.c
> +++ b/drivers/edac/ti_edac.c
> @@ -278,7 +278,8 @@ static int ti_edac_probe(struct platform_device *pdev)
>
> /* add EMIF ECC error handler */
> error_irq = platform_get_irq(pdev, 0);
> - if (!error_irq) {
> + if (error_irq < 0) {
> + ret = error_irq;
> edac_printk(KERN_ERR, EDAC_MOD_NAME,
> "EMIF irq number not defined.\n");
> goto err;
>
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
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] 5+ messages in thread
* Re: [PATCH 1/2] EDAC/aspeed: Fix handling of platform_get_irq() error
2020-08-27 7:07 ` [PATCH 1/2] EDAC/aspeed: Fix handling of platform_get_irq() error Krzysztof Kozlowski
2020-08-27 7:07 ` [PATCH 2/2] EDAC/ti: " Krzysztof Kozlowski
@ 2020-08-27 23:49 ` Stefan Schaeckeler
2020-09-01 18:51 ` Borislav Petkov
2 siblings, 0 replies; 5+ messages in thread
From: Stefan Schaeckeler @ 2020-08-27 23:49 UTC (permalink / raw)
To: Krzysztof Kozlowski, Borislav Petkov, Mauro Carvalho Chehab,
Tony Luck, James Morse, Robert Richter, Joel Stanley,
Andrew Jeffery, Tero Kristo, linux-edac@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org
Cc: Stefan Schaeckeler
> platform_get_irq() returns -ERRNO on error. In such case comparison
> to 0 would pass the check.
>
> Fixes: 9b7e6242ee4e ("EDAC, aspeed: Add an Aspeed AST2500 EDAC driver")
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Stefan Schaeckeler <schaecsn@gmx.net>
> ---
> drivers/edac/aspeed_edac.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
> index b194658b8b5c..fbec28dc661d 100644
> --- a/drivers/edac/aspeed_edac.c
> +++ b/drivers/edac/aspeed_edac.c
> @@ -209,8 +209,8 @@ static int config_irq(void *ctx, struct platform_device *pdev)
> /* register interrupt handler */
> irq = platform_get_irq(pdev, 0);
> dev_dbg(&pdev->dev, "got irq %d\n", irq);
> - if (!irq)
> - return -ENODEV;
> + if (irq < 0)
> + return irq;
>
> rc = devm_request_irq(&pdev->dev, irq, mcr_isr, IRQF_TRIGGER_HIGH,
> DRV_NAME, ctx);
> --
> 2.17.1
>
>
_______________________________________________
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] 5+ messages in thread* Re: [PATCH 1/2] EDAC/aspeed: Fix handling of platform_get_irq() error
2020-08-27 7:07 ` [PATCH 1/2] EDAC/aspeed: Fix handling of platform_get_irq() error Krzysztof Kozlowski
2020-08-27 7:07 ` [PATCH 2/2] EDAC/ti: " Krzysztof Kozlowski
2020-08-27 23:49 ` [PATCH 1/2] EDAC/aspeed: " Stefan Schaeckeler
@ 2020-09-01 18:51 ` Borislav Petkov
2 siblings, 0 replies; 5+ messages in thread
From: Borislav Petkov @ 2020-09-01 18:51 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Tony Luck, Robert Richter, linux-aspeed, Andrew Jeffery,
linux-kernel, Tero Kristo, James Morse, Joel Stanley,
Stefan Schaeckeler, Mauro Carvalho Chehab, linux-arm-kernel,
linux-edac
On Thu, Aug 27, 2020 at 09:07:42AM +0200, Krzysztof Kozlowski wrote:
> platform_get_irq() returns -ERRNO on error. In such case comparison
> to 0 would pass the check.
>
> Fixes: 9b7e6242ee4e ("EDAC, aspeed: Add an Aspeed AST2500 EDAC driver")
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
> drivers/edac/aspeed_edac.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Both applied,
thanks.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
_______________________________________________
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] 5+ messages in thread