linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-gpio@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Michal Simek <michal.simek@xilinx.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: zynq: change error code for pinctrl_register failure
Date: Tue, 26 May 2015 11:37:34 -0700	[thread overview]
Message-ID: <20150526183734.GA31081@xsjsorenbubuntu> (raw)
In-Reply-To: <4437293.G26yCXqFQH@wuerfel>

On Tue, 2015-05-26 at 10:12AM +0200, Arnd Bergmann wrote:
> On Tuesday 26 May 2015 13:18:29 Masahiro Yamada wrote:
> > 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);
> >  
> > 
> 
> One choice seems as bad as the other to me ;-)
> 
> Could we add a pinctrl_register_reason() variant that returns a meaningful
> error code as ERR_PTR?

I agree with Arnd. As long as we don't get a precise error code we can
just keep the current one.

	Sören

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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26  4:18 [PATCH] pinctrl: zynq: change error code for pinctrl_register failure Masahiro Yamada
2015-05-26  8:12 ` Arnd Bergmann
2015-05-26  8:20   ` Masahiro Yamada
2015-05-26 18:37   ` Sören Brinkmann [this message]
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=20150526183734.GA31081@xsjsorenbubuntu \
    --to=soren.brinkmann@xilinx.com \
    --cc=arnd@arndb.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=yamada.masahiro@socionext.com \
    /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;
as well as URLs for NNTP newsgroup(s).