public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@ingics.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] pinctrl: coh901: Return proper error if irq_domain_add_linear() fails
Date: Wed, 14 Nov 2012 00:16:14 +0800	[thread overview]
Message-ID: <1352823374.10676.1.camel@phoenix> (raw)

Return -ENOMEM instead of 0 if irq_domain_add_linear fails.

Signed-off-by: Axel Lin <axel.lin@ingics.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




             reply	other threads:[~2012-11-13 16:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-13 16:16 Axel Lin [this message]
2012-11-15 11:17 ` [PATCH] pinctrl: coh901: Return proper error if irq_domain_add_linear() fails Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1352823374.10676.1.camel@phoenix \
    --to=axel.lin@ingics.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox