mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shawn Guo <shawn.guo@freescale.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: <linux-kernel@vger.kernel.org>, <kernel@pengutronix.de>,
	<linux-arm-kernel@lists.infradead.org>,
	Shawn Guo <shawn.guo@linaro.org>, Alan Cox <alan@linux.intel.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Jeremy Kerr <jeremy.kerr@canonical.com>,
	Jason Liu <jason.hui@linaro.org>,
	Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH] serial/imx: propagate error from of_alias_get_id instead of using -ENODEV
Date: Thu, 15 Dec 2011 10:06:49 +0800	[thread overview]
Message-ID: <20111215020648.GC3259@S2101-09.ap.freescale.net> (raw)
In-Reply-To: <1323894411-12294-1-git-send-email-u.kleine-koenig@pengutronix.de>

On Wed, Dec 14, 2011 at 09:26:51PM +0100, Uwe Kleine-König wrote:
> A quick look at of_alias_get_id shows that in the error case it returns
> -ENODEV, too, but still it's better style to propagate the value as is.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Alan Cox <alan@linux.intel.com>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
> Cc: Jason Liu <jason.hui@linaro.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> ---

Acked-by: Shawn Guo <shawn.guo@linaro.org>

The only errno that of_alias_get_id could return is also -ENODEV though.

Regards,
Shawn

>  drivers/tty/serial/imx.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index 163fc90..75c159a 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -1301,7 +1301,7 @@ static int serial_imx_probe_dt(struct imx_port *sport,
>  	ret = of_alias_get_id(np, "serial");
>  	if (ret < 0) {
>  		dev_err(&pdev->dev, "failed to get alias id, errno %d\n", ret);
> -		return -ENODEV;
> +		return ret;
>  	}
>  	sport->port.line = ret;
>  
> -- 
> 1.7.7.3


  parent reply	other threads:[~2011-12-15  1:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 20:26 Uwe Kleine-König
2011-12-14 20:31 ` Uwe Kleine-König
2011-12-15  2:10   ` Shawn Guo
2011-12-15  8:16     ` [PATCH] serial/imx: let probing fail for the dt case without a valid alias Uwe Kleine-König
2011-12-15  9:08       ` Shawn Guo
2011-12-26  1:56       ` Shawn Guo
2011-12-15  2:06 ` Shawn Guo [this message]
2011-12-15  2:59 ` [PATCH] serial/imx: propagate error from of_alias_get_id instead of using -ENODEV Jason Hui
2011-12-26  1:55 ` Shawn Guo

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=20111215020648.GC3259@S2101-09.ap.freescale.net \
    --to=shawn.guo@freescale.com \
    --cc=alan@linux.intel.com \
    --cc=grant.likely@secretlab.ca \
    --cc=jason.hui@linaro.org \
    --cc=jeremy.kerr@canonical.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.guo@linaro.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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

all inboxes | Powered by JetHome®