summaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-aspeed-i2c-ic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/irqchip/irq-aspeed-i2c-ic.c')
-rw-r--r--drivers/irqchip/irq-aspeed-i2c-ic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-aspeed-i2c-ic.c b/drivers/irqchip/irq-aspeed-i2c-ic.c
index a47db16ff960..9c9fc3e2967e 100644
--- a/drivers/irqchip/irq-aspeed-i2c-ic.c
+++ b/drivers/irqchip/irq-aspeed-i2c-ic.c
@@ -77,8 +77,8 @@ static int __init aspeed_i2c_ic_of_init(struct device_node *node,
}
i2c_ic->parent_irq = irq_of_parse_and_map(node, 0);
- if (i2c_ic->parent_irq < 0) {
- ret = i2c_ic->parent_irq;
+ if (!i2c_ic->parent_irq) {
+ ret = -EINVAL;
goto err_iounmap;
}