linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drivers/tty/serial: Add missing clk_disable_unprepare()
@ 2022-06-17  2:58 Guo Mengqi
  2022-06-27 12:06 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Guo Mengqi @ 2022-06-17  2:58 UTC (permalink / raw)
  To: gregkh, jirislaby, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, nsaenz, athierry, linux-serial,
	linux-rpi-kernel, linux-arm-kernel, linux-kernel
  Cc: xuqiang36

Add missing clk_disable_unprepare() when get clk rate fails.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Guo Mengqi <guomengqi3@huawei.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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-07-15  2:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-17  2:58 [PATCH -next] drivers/tty/serial: Add missing clk_disable_unprepare() Guo Mengqi
2022-06-27 12:06 ` Greg KH
2022-07-06  3:00 ` [PATCH -next v2] serial: 8250_bcm2835aux: " Guo Mengqi
2022-07-12  3:35 ` [PATCH -next] drivers/tty/serial: " Florian Fainelli
2022-07-13  7:37   ` guomengqi (A)
2022-07-15  2:33     ` [PATCH -next v3] serial: 8250_bcm2835aux: " Guo Mengqi
2022-07-15  2:41       ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).