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

Andrew Jeffery andrew at aj.id.au
Fri Jul 22 12:14:31 AEST 2022



On Fri, 3 Jun 2022, at 22:09, Miaoqian Lin wrote:
> 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: 9f4f9ae81d0a ("drivers/misc: add Aspeed LPC snoop driver")
> Signed-off-by: Miaoqian Lin <linmq006 at gmail.com>

Reviewed-by: Andrew Jeffery <andrew at aj.id.au>


More information about the Linux-aspeed mailing list