diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2024-02-22 12:19:23 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-03-02 22:04:34 +0100 |
commit | 65295eba1915cf27c363f26727f6da43d144d03b (patch) | |
tree | d3bd0e5c216a2c5bd1e92768a8ca8462a0e76af2 /drivers/tty/serial | |
parent | dt-bindings: serial: convert st,asc to DT schema (diff) | |
download | linux-65295eba1915cf27c363f26727f6da43d144d03b.tar.xz linux-65295eba1915cf27c363f26727f6da43d144d03b.zip |
serial: 8250_dw: Emit an error message if getting the baudclk failed
Instead of silently giving up, at least tell what the problem is.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240222111922.2016122-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/8250/8250_dw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 2d1f350a4bea..94aa3dddb71e 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -597,7 +597,8 @@ static int dw8250_probe(struct platform_device *pdev) if (data->clk == NULL) data->clk = devm_clk_get_optional_enabled(dev, NULL); if (IS_ERR(data->clk)) - return PTR_ERR(data->clk); + return dev_err_probe(dev, PTR_ERR(data->clk), + "failed to get baudclk\n"); INIT_WORK(&data->clk_work, dw8250_clk_work_cb); data->clk_notifier.notifier_call = dw8250_clk_notifier_cb; |