EDAC/aspeed: Fix handling of platform_get_irq() error
Subsystems (4)
PATCH 1/2 EDAC/aspeed: Fix handling of platform_get_irq() error
platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check.
--- drivers/edac/aspeed_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/edac/aspeed_edac.c +2 -2
@@ -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);
Signature · 1 line
2.17.1
PATCH 2/2 EDAC/ti: Fix handling of platform_get_irq() error
platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check.
--- drivers/edac/ti_edac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/edac/ti_edac.c +2 -1
@@ -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;
Signature · 1 line
2.17.1
Re: [PATCH 2/2] EDAC/ti: Fix handling of platform_get_irq() error
Quoted 5 lines · Krzysztof Kozlowski
platform_get_irq()returns-ERRNOon 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 <[email protected]>
Quoted 10 lines
--- drivers/edac/ti_edac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/edac/ti_edac.c +0
-0
drivers/edac/ti_edac.c static int ti_edac_probe(struct platform_device *pdev) · line 285
Quoted 9 lines
drivers/edac/ti_edac.c +2
-1@@ -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
Quoted 5 lines
platform_get_irq()returns-ERRNOon 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 <[email protected]>
Quoted 23 lines
---
drivers/edac/aspeed_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)diff --git
a/drivers/edac/aspeed_edac.cb/drivers/edac/aspeed_edac.cindexb194658b8b5c..fbec28dc661d100644
---a/drivers/edac/aspeed_edac.c
+++b/drivers/edac/aspeed_edac.c
@@ -209,8 +209,8 @@ static intconfig_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
Borislav Petkov
maintainerQuoted 8 lines · Krzysztof Kozlowski
platform_get_irq()returns-ERRNOon 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 <[email protected]>--- drivers/edac/aspeed_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Both applied,
thanks.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette