summaryrefslogtreecommitdiff
path: root/drivers/tty/serial
diff options
context:
space:
mode:
authorArtem Shimko <a.shimko.dev@gmail.com>2025-10-19 12:51:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-29 14:09:01 +0100
commitd50a92393c6f173432aa6b0df8cf83c0243e4510 (patch)
tree8287e6bb1d30c9a8ce4a2743117dbfb427f1a5ff /drivers/tty/serial
parent34669730146dc8eddc265b1b1c44b15f84ca8c19 (diff)
downloadlinux-d50a92393c6f173432aa6b0df8cf83c0243e4510.tar.gz
linux-d50a92393c6f173432aa6b0df8cf83c0243e4510.tar.bz2
linux-d50a92393c6f173432aa6b0df8cf83c0243e4510.zip
serial: 8250_dw: handle reset control deassert error
commit daeb4037adf7d3349b4a1fb792f4bc9824686a4b upstream. Check the return value of reset_control_deassert() in the probe function to prevent continuing probe when reset deassertion fails. Previously, reset_control_deassert() was called without checking its return value, which could lead to probe continuing even when the device reset wasn't properly deasserted. The fix checks the return value and returns an error with dev_err_probe() if reset deassertion fails, providing better error handling and diagnostics. Fixes: acbdad8dd1ab ("serial: 8250_dw: simplify optional reset handling") Cc: stable <stable@kernel.org> Signed-off-by: Artem Shimko <a.shimko.dev@gmail.com> Link: https://patch.msgid.link/20251019095131.252848-1-a.shimko.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r--drivers/tty/serial/8250/8250_dw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 51894c93c8a3..83d186c038cd 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -620,7 +620,9 @@ static int dw8250_probe(struct platform_device *pdev)
if (IS_ERR(data->rst))
return PTR_ERR(data->rst);
- reset_control_deassert(data->rst);
+ err = reset_control_deassert(data->rst);
+ if (err)
+ return dev_err_probe(dev, err, "failed to deassert resets\n");
err = devm_add_action_or_reset(dev, dw8250_reset_control_assert, data->rst);
if (err)