Commit a197a191 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Greg Kroah-Hartman

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: default avatarUwe 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: default avatarJason Liu <jason.hui@linaro.org>
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent db1a9b55
......@@ -1316,7 +1316,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment