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

Dan Carpenter dan.carpenter at linaro.org
Thu Oct 26 21:38:19 PDT 2023


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 at nfschina.com>

Reviewed-by: Dan Carpenter <dan.carpenter at linaro.org>

regards,
dan carpenter




More information about the linux-arm-kernel mailing list