diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-12-14 15:26:51 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-04 19:30:34 -0500 |
commit | a197a191f73a75d80d5b67e09e0b89c214dc3690 (patch) | |
tree | 45effc90d9e00fc64f5c539a05a7bce340ebca31 | |
parent | db1a9b55004c83ded54c1f869f81a8a59c6dde87 (diff) |
serial/imx: propagate error from of_alias_get_id instead of using -ENODEV
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: Jason Liu <jason.hui@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | 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 ed6e1448e7eb..2813f0210377 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c | |||
@@ -1316,7 +1316,7 @@ static int serial_imx_probe_dt(struct imx_port *sport, | |||
1316 | ret = of_alias_get_id(np, "serial"); | 1316 | ret = of_alias_get_id(np, "serial"); |
1317 | if (ret < 0) { | 1317 | if (ret < 0) { |
1318 | dev_err(&pdev->dev, "failed to get alias id, errno %d\n", ret); | 1318 | dev_err(&pdev->dev, "failed to get alias id, errno %d\n", ret); |
1319 | return -ENODEV; | 1319 | return ret; |
1320 | } | 1320 | } |
1321 | sport->port.line = ret; | 1321 | sport->port.line = ret; |
1322 | 1322 | ||