Re: [PATCH] soc: aspeed: lpc: Fix impossible judgment condition

From: Dan Carpenter
Date: Fri Oct 27 2023 - 00:38:43 EST


On Fri, Oct 27, 2023 at 10:07:04AM +0800, Su Hui wrote:
> smatch error:
> drivers/soc/aspeed/aspeed-lpc-snoop.c:169
> aspeed_lpc_snoop_config_irq() warn: platform_get_irq() does not return zero
>
> platform_get_irq() return non-zero IRQ number or negative error code,
> change '!lpc_snoop->irq' to 'lpc_snoop->irq < 0' to fix this.
>
> Fixes: 9f4f9ae81d0a ("drivers/misc: add Aspeed LPC snoop driver")
> Signed-off-by: Su Hui <suhui@xxxxxxxxxxxx>

Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

regards,
dan carpenter