Skip to content

Commit

Permalink
pinctrl: coh901: Return proper error if irq_domain_add_linear() fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Linus Walleij committed Nov 15, 2012
1 parent 4484d0b commit 8035720
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/pinctrl/pinctrl-coh901.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,10 @@ static int __init u300_gpio_probe(struct platform_device *pdev)
U300_GPIO_PINS_PER_PORT,
&irq_domain_simple_ops,
port);
if (!port->domain)
if (!port->domain) {
err = -ENOMEM;
goto err_no_domain;
}

irq_set_chained_handler(port->irq, u300_gpio_irq_handler);
irq_set_handler_data(port->irq, port);
Expand Down Expand Up @@ -801,7 +803,7 @@ static int __init u300_gpio_probe(struct platform_device *pdev)
err_no_port:
u300_gpio_free_ports(gpio);
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;
}

Expand Down

0 comments on commit 8035720

Please sign in to comment.