mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
spi: hisi-sfc-v3xx: Propagate errors from optional IRQ lookup
platform_get_irq_optional() returns a positive IRQ number on success or a negative error code on failure. For an optional IRQ, -ENXIO indicates that no IRQ is available, while other errors should be propagated. Instead of only checking for -EPROBE_DEFER, propagate all error codes returned by platform_get_irq_optional() other than -ENXIO, so that failures are properly reported to the caller. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260807103848.46315-1-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
c10b7f5e0c
commit
e4702b6ff3
|
|
@ -454,8 +454,8 @@ static int hisi_sfc_v3xx_probe(struct platform_device *pdev)
|
|||
return PTR_ERR(host->regbase);
|
||||
|
||||
host->irq = platform_get_irq_optional(pdev, 0);
|
||||
if (host->irq == -EPROBE_DEFER)
|
||||
return -EPROBE_DEFER;
|
||||
if (host->irq < 0 && host->irq != -ENXIO)
|
||||
return host->irq;
|
||||
|
||||
hisi_sfc_v3xx_disable_int(host);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user