Commit 80357203 authored by Axel Lin's avatar Axel Lin Committed by Linus Walleij

pinctrl: coh901: Return proper error if irq_domain_add_linear() fails

Return -ENOMEM instead of 0 if irq_domain_add_linear fails.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 4484d0b1
...@@ -752,8 +752,10 @@ static int __init u300_gpio_probe(struct platform_device *pdev) ...@@ -752,8 +752,10 @@ static int __init u300_gpio_probe(struct platform_device *pdev)
U300_GPIO_PINS_PER_PORT, U300_GPIO_PINS_PER_PORT,
&irq_domain_simple_ops, &irq_domain_simple_ops,
port); port);
if (!port->domain) if (!port->domain) {
err = -ENOMEM;
goto err_no_domain; goto err_no_domain;
}
irq_set_chained_handler(port->irq, u300_gpio_irq_handler); irq_set_chained_handler(port->irq, u300_gpio_irq_handler);
irq_set_handler_data(port->irq, port); irq_set_handler_data(port->irq, port);
...@@ -801,7 +803,7 @@ static int __init u300_gpio_probe(struct platform_device *pdev) ...@@ -801,7 +803,7 @@ static int __init u300_gpio_probe(struct platform_device *pdev)
err_no_port: err_no_port:
u300_gpio_free_ports(gpio); u300_gpio_free_ports(gpio);
clk_disable_unprepare(gpio->clk); clk_disable_unprepare(gpio->clk);
dev_info(&pdev->dev, "module ERROR:%d\n", err); dev_err(&pdev->dev, "module ERROR:%d\n", err);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment