mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] serial/imx: propagate error from of_alias_get_id instead of using -ENODEV
@ 2011-12-14 20:26 Uwe Kleine-König
  2011-12-14 20:31 ` Uwe Kleine-König
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2011-12-14 20:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: kernel, linux-arm-kernel, Shawn Guo, Alan Cox, Grant Likely,
	Jeremy Kerr, Jason Liu, Sascha Hauer

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>
---
 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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-12-26  1:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-14 20:26 [PATCH] serial/imx: propagate error from of_alias_get_id instead of using -ENODEV 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 ` [PATCH] serial/imx: propagate error from of_alias_get_id instead of using -ENODEV Shawn Guo
2011-12-15  2:59 ` Jason Hui
2011-12-26  1:55 ` Shawn Guo

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®