]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
soc: aspeed: lpc: Fix impossible judgment condition
authorSu Hui <suhui@nfschina.com>
Thu, 15 May 2025 06:30:43 +0000 (16:00 +0930)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:15 +0000 (11:05 +0100)
commit0fab016dc4aaefcc89550563f75ea504dcc5d0b5
tree5412a087a2e2c01a3ed81d0ad33bf7c857eb54b6
parent3a2249e91547aa1f2f4738344f7b2b7cd327b25b
soc: aspeed: lpc: Fix impossible judgment condition

[ Upstream commit d9f0a97e859bdcef51f9c187b1eb712eb13fd3ff ]

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@nfschina.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20231027020703.1231875-1-suhui@nfschina.com
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/aspeed/aspeed-lpc-snoop.c