serial: 8250_of: fix return code when probe function fails to get reset
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 27 Dec 2017 05:21:05 +0000 (14:21 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Feb 2018 16:39:22 +0000 (17:39 +0100)
commitaa33208b5a6f0014d9b7d966f61bd6c4f8cd9729
treede5ee7e7990e421e692d25f678f11b4625798eef
parente00c5c771877abdb70814ce555f020deab42bd46
serial: 8250_of: fix return code when probe function fails to get reset

commit b9820a31691b771db37afe2054dd3d3a680c1eed upstream.

The error pointer from devm_reset_control_get_optional_shared() is
not propagated.

One of the most common problem scenarios is it returns -EPROBE_DEFER
when the reset controller has not probed yet.  In this case, the
probe of the reset consumer should be deferred.

Fixes: e2860e1f62f2 ("serial: 8250_of: Add reset support")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_of.c