]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: ppc4xx: handle irq_of_parse_and_map() errors
authorMa Ke <make24@iscas.ac.cn>
Wed, 24 Jul 2024 08:40:47 +0000 (16:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:10:48 +0000 (15:10 +0200)
commit89008d5e4b2fa8b9983262fdad4d1ec3acac61ff
treee808e743c77bfb1dd127cbbad50833d4d20c45f2
parentcc4d21d9492db4e534d3e01253cf885c90dd2a8b
spi: ppc4xx: handle irq_of_parse_and_map() errors

[ Upstream commit 0f245463b01ea254ae90e1d0389e90b0e7d8dc75 ]

Zero and negative number is not a valid IRQ for in-kernel code and the
irq_of_parse_and_map() function returns zero on error.  So this check for
valid IRQs should only accept values > 0.

Fixes: 44dab88e7cc9 ("spi: add spi_ppc4xx driver")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Link: https://patch.msgid.link/20240724084047.1506084-1-make24@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-ppc4xx.c