[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220617025827.130497-1-guomengqi3@huawei.com>
Date: Fri, 17 Jun 2022 10:58:27 +0800
From: Guo Mengqi <guomengqi3@...wei.com>
To: <gregkh@...uxfoundation.org>, <jirislaby@...nel.org>,
<f.fainelli@...il.com>, <rjui@...adcom.com>,
<sbranden@...adcom.com>, <bcm-kernel-feedback-list@...adcom.com>,
<nsaenz@...nel.org>, <athierry@...hat.com>,
<linux-serial@...r.kernel.org>,
<linux-rpi-kernel@...ts.infradead.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
CC: <xuqiang36@...wei.com>
Subject: [PATCH -next] drivers/tty/serial: Add missing clk_disable_unprepare()
Add missing clk_disable_unprepare() when get clk rate fails.
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Guo Mengqi <guomengqi3@...wei.com>
---
drivers/tty/serial/8250/8250_bcm2835aux.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_bcm2835aux.c b/drivers/tty/serial/8250/8250_bcm2835aux.c
index 2a1226a78a0c..21939bb44613 100644
--- a/drivers/tty/serial/8250/8250_bcm2835aux.c
+++ b/drivers/tty/serial/8250/8250_bcm2835aux.c
@@ -166,8 +166,10 @@ static int bcm2835aux_serial_probe(struct platform_device *pdev)
uartclk = clk_get_rate(data->clk);
if (!uartclk) {
ret = device_property_read_u32(&pdev->dev, "clock-frequency", &uartclk);
- if (ret)
- return dev_err_probe(&pdev->dev, ret, "could not get clk rate\n");
+ if (ret) {
+ dev_err_probe(&pdev->dev, ret, "could not get clk rate\n");
+ goto dis_clk;
+ }
}
/* the HW-clock divider for bcm2835aux is 8,
--
2.17.1
Powered by blists - more mailing lists