summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorStefan Potyra <Stefan.Potyra@elektrobit.com>2017-12-06 16:46:12 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-15 20:27:43 +0100
commit8af016aa5a27c6a2505460eb4d83f1e70c38dc43 (patch)
tree08479e60e95980ad1d5d8d715edbaf595fc07ff1 /drivers/tty
parent0858fe3c9c8bf0e4a73da7b2759950ee75ed8995 (diff)
downloadop-kernel-dev-8af016aa5a27c6a2505460eb4d83f1e70c38dc43.zip
op-kernel-dev-8af016aa5a27c6a2505460eb4d83f1e70c38dc43.tar.gz
serial: 8250_dw: Disable clock on error
If there is no clock rate for uartclk defined, disable the previously enabled clock again. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 23f5b3fdd04e serial: 8250_dw: only get the clock rate in one place Signed-off-by: Stefan Potyra <Stefan.Potyra@elektrobit.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_dw.c3
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 5bb0c42..bda75d3 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -515,7 +515,8 @@ static int dw8250_probe(struct platform_device *pdev)
/* If no clock rate is defined, fail. */
if (!p->uartclk) {
dev_err(dev, "clock rate not defined\n");
- return -EINVAL;
+ err = -EINVAL;
+ goto err_clk;
}
data->pclk = devm_clk_get(dev, "apb_pclk");
OpenPOWER on IntegriCloud