mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
serial: 8250_of: fix return code when probe function fails to get reset
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: e2860e1f62 ("serial: 8250_of: Add reset support")
Cc: [email protected] # v4.13+
Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Philipp Zabel <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
38b1f0fb42
commit
b9820a3169
1 changed files with 4 additions and 1 deletions
|
|
@ -136,8 +136,11 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
|
|||
}
|
||||
|
||||
info->rst = devm_reset_control_get_optional_shared(&ofdev->dev, NULL);
|
||||
if (IS_ERR(info->rst))
|
||||
if (IS_ERR(info->rst)) {
|
||||
ret = PTR_ERR(info->rst);
|
||||
goto err_dispose;
|
||||
}
|
||||
|
||||
ret = reset_control_deassert(info->rst);
|
||||
if (ret)
|
||||
goto err_dispose;
|
||||
|
|
|
|||
Loading…
Reference in a new issue