public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: yamada.masahiro@socionext.com (Masahiro Yamada)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: zynq: change error code for pinctrl_register failure
Date: Tue, 26 May 2015 13:18:29 +0900	[thread overview]
Message-ID: <1432613909-13457-1-git-send-email-yamada.masahiro@socionext.com> (raw)

pinctrl_register() could fail for memory unrelated errors.
Returning -EINVAL (or -ENODEV) seems more suitable for here.
At least, the other pinctrl drivers do so.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/pinctrl/pinctrl-zynq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-zynq.c b/drivers/pinctrl/pinctrl-zynq.c
index 04748a4..0ff653c 100644
--- a/drivers/pinctrl/pinctrl-zynq.c
+++ b/drivers/pinctrl/pinctrl-zynq.c
@@ -1141,7 +1141,7 @@ static int zynq_pinctrl_probe(struct platform_device *pdev)
 
 	pctrl->pctrl = pinctrl_register(&zynq_desc, &pdev->dev, pctrl);
 	if (!pctrl->pctrl)
-		return -ENOMEM;
+		return -EINVAL;
 
 	platform_set_drvdata(pdev, pctrl);
 
-- 
1.9.1

             reply	other threads:[~2015-05-26  4:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26  4:18 Masahiro Yamada [this message]
2015-05-26  8:12 ` [PATCH] pinctrl: zynq: change error code for pinctrl_register failure Arnd Bergmann
2015-05-26  8:20   ` Masahiro Yamada
2015-05-26 18:37   ` Sören Brinkmann
2015-05-27  1:18     ` Masahiro Yamada
2015-06-01 15:00     ` 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=1432613909-13457-1-git-send-email-yamada.masahiro@socionext.com \
    --to=yamada.masahiro@socionext.com \
    --cc=linux-arm-kernel@lists.infradead.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