Patch "EDAC/aspeed: Fix handling of platform_get_irq() error" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    EDAC/aspeed: Fix handling of platform_get_irq() error

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     edac-aspeed-fix-handling-of-platform_get_irq-error.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 83738e6a06bbc9ef998253964b95b90c5d3767dd
Author: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Date:   Thu Aug 27 09:07:42 2020 +0200

    EDAC/aspeed: Fix handling of platform_get_irq() error
    
    [ Upstream commit afce6996943be265fa39240b67025cfcb1bcdfb1 ]
    
    platform_get_irq() returns a negative error number on error. In such a
    case, comparison to 0 would pass the check therefore check the return
    value properly, whether it is negative.
    
     [ bp: Massage commit message. ]
    
    Fixes: 9b7e6242ee4e ("EDAC, aspeed: Add an Aspeed AST2500 EDAC driver")
    Signed-off-by: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
    Signed-off-by: Borislav Petkov <bp@xxxxxxx>
    Reviewed-by: Stefan Schaeckeler <schaecsn@xxxxxxx>
    Link: https://lkml.kernel.org/r/20200827070743.26628-1-krzk@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
index 5634437bb39d2..66669f9d690be 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);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux