[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1352823374.10676.1.camel@phoenix>
Date: Wed, 14 Nov 2012 00:16:14 +0800
From: Axel Lin <axel.lin@...ics.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...ics.com>
---
drivers/pinctrl/pinctrl-coh901.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c
index 5c7daf9..1144dcd 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)
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);
@@ -801,7 +803,7 @@ err_no_domain:
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;
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists