mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
watchdog: aspeed: 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. Propagate errors such as -EPROBE_DEFER and -EINVAL instead of continuing probe without the IRQ. Signed-off-by: bui duc phuc <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
This commit is contained in:
1 parent
553edb793e
commit
1f3c3fa76d
1 file changed
+2
@@ -429,6 +429,8 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
|
||||
if (wdt->cfg->irq_mask) {
|
||||
int irq = platform_get_irq_optional(pdev, 0);
|
||||
|
||||
if (irq < 0 && irq != -ENXIO)
|
||||
return irq;
|
||||
if (irq > 0) {
|
||||
ret = devm_request_irq(dev, irq, aspeed_wdt_irq,
|
||||
IRQF_SHARED, dev_name(dev),
|
||||
|
||||
Reference in new issue
Block a user