[PATCH] soc: aspeed: Fix IRQ check in aspeed_lpc_snoop_config_irq

ChiaWei Wang chiawei_wang at aspeedtech.com
Mon Jan 17 11:05:48 AEDT 2022


> From: Miaoqian Lin <linmq006 at gmail.com>
> Sent: Friday, January 14, 2022 2:44 PM
> 
> platform_get_irq() returns negative error number instead 0 on failure.
> And the doc of platform_get_irq() provides a usage example:
> 
>     int irq = platform_get_irq(pdev, 0);
>     if (irq < 0)
>         return irq;
> 
> Fix the check of return value to catch errors correctly.
> 
> Fixes: 524feb799408 ("soc: add aspeed folder and misc drivers")
> Signed-off-by: Miaoqian Lin <linmq006 at gmail.com>

Reviewed-by: Chia-Wei Wang <chiawei_wang at aspeedtech.com>

Thanks.


More information about the Linux-aspeed mailing list