aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-coh901.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2012-11-13 11:16:14 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-11-15 06:17:04 -0500
commit80357203ec68a2c8ebcb61d2cebdf02d10369af1 (patch)
tree9070d24ab8691a119ec793674858bd15b6a99c0b /drivers/pinctrl/pinctrl-coh901.c
parent4484d0b17982af8d7af2c21bcc67e47f4237ce70 (diff)
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: Axel Lin <axel.lin@ingics.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-coh901.c')
-rw-r--r--drivers/pinctrl/pinctrl-coh901.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c
index 5c7daf9169e8..1144dcdf2da0 100644
--- a/drivers/pinctrl/pinctrl-coh901.c
+++ b/drivers/pinctrl/pinctrl-coh901.c
@@ -752,8 +752,10 @@ static int __init u300_gpio_probe(struct platform_device *pdev)
752 U300_GPIO_PINS_PER_PORT, 752 U300_GPIO_PINS_PER_PORT,
753 &irq_domain_simple_ops, 753 &irq_domain_simple_ops,
754 port); 754 port);
755 if (!port->domain) 755 if (!port->domain) {
756 err = -ENOMEM;
756 goto err_no_domain; 757 goto err_no_domain;
758 }
757 759
758 irq_set_chained_handler(port->irq, u300_gpio_irq_handler); 760 irq_set_chained_handler(port->irq, u300_gpio_irq_handler);
759 irq_set_handler_data(port->irq, port); 761 irq_set_handler_data(port->irq, port);
@@ -801,7 +803,7 @@ err_no_domain:
801err_no_port: 803err_no_port:
802 u300_gpio_free_ports(gpio); 804 u300_gpio_free_ports(gpio);
803 clk_disable_unprepare(gpio->clk); 805 clk_disable_unprepare(gpio->clk);
804 dev_info(&pdev->dev, "module ERROR:%d\n", err); 806 dev_err(&pdev->dev, "module ERROR:%d\n", err);
805 return err; 807 return err;
806} 808}
807 809