mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
ASoC: cs35l56: Accept values greater than 0 as IRQ numbers
[ Upstream commit 3ec1428d7b7c519d757a013cef908d7e33dee882 ]
IRQ lookup functions such as those in ACPI can return error values when
an IRQ is not defined. The i2c core driver converts the error codes to a
value of 0 and the SPI bus driver passes them unaltered to client device
drivers.
The cs35l56 driver should only accept positive non-zero values as IRQ
numbers.
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Fixes: 8a731fd37f ("ASoC: cs35l56: Move utility functions to shared file")
Link: https://msgid.link/r/20240617135338.82006-1-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
417fb74fa7
commit
5f7b12db1f
@@ -354,7 +354,7 @@ int cs35l56_irq_request(struct cs35l56_base *cs35l56_base, int irq)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!irq)
|
||||
if (irq < 1)
|
||||
return 0;
|
||||
|
||||
ret = devm_request_threaded_irq(cs35l56_base->dev, irq, NULL, cs35l56_irq,
|
||||
|
||||
Reference in New Issue
Block a user