All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serial: 8250_lpc18xx: disable clks on error in probe()
@ 2024-03-16  9:30 Dan Carpenter
  2024-03-18 10:03 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2024-03-16  9:30 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Greg Kroah-Hartman, Jiri Slaby, Vladimir Zapolskiy,
	Geert Uytterhoeven, Florian Fainelli, Uwe Kleine-König,
	linux-kernel, linux-serial, kernel-janitors

Goto the clean up path to clean up a couple clocks before returning
on this error path.

Fixes: 0087b9e694ee ("serial: 8250_lpc18xx: Switch to use uart_read_port_properties()")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/tty/serial/8250/8250_lpc18xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_lpc18xx.c b/drivers/tty/serial/8250/8250_lpc18xx.c
index 7984ee05af1d..47e1a056a60c 100644
--- a/drivers/tty/serial/8250/8250_lpc18xx.c
+++ b/drivers/tty/serial/8250/8250_lpc18xx.c
@@ -151,7 +151,7 @@ static int lpc18xx_serial_probe(struct platform_device *pdev)
 
 	ret = uart_read_port_properties(&uart.port);
 	if (ret)
-		return ret;
+		goto dis_uart_clk;
 
 	uart.port.iotype = UPIO_MEM32;
 	uart.port.regshift = 2;
-- 
2.43.0


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

* Re: [PATCH] serial: 8250_lpc18xx: disable clks on error in probe()
  2024-03-16  9:30 [PATCH] serial: 8250_lpc18xx: disable clks on error in probe() Dan Carpenter
@ 2024-03-18 10:03 ` Andy Shevchenko
  2024-03-18 10:22   ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2024-03-18 10:03 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Greg Kroah-Hartman, Jiri Slaby, Vladimir Zapolskiy,
	Geert Uytterhoeven, Florian Fainelli, Uwe Kleine-König,
	linux-kernel, linux-serial, kernel-janitors

On Sat, Mar 16, 2024 at 12:30:09PM +0300, Dan Carpenter wrote:
> Goto the clean up path to clean up a couple clocks before returning
> on this error path.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thank you for fixing this!

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH] serial: 8250_lpc18xx: disable clks on error in probe()
  2024-03-18 10:03 ` Andy Shevchenko
@ 2024-03-18 10:22   ` Andy Shevchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2024-03-18 10:22 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Greg Kroah-Hartman, Jiri Slaby, Vladimir Zapolskiy,
	Geert Uytterhoeven, Florian Fainelli, Uwe Kleine-König,
	linux-kernel, linux-serial, kernel-janitors

On Mon, Mar 18, 2024 at 12:03:38PM +0200, Andy Shevchenko wrote:
> On Sat, Mar 16, 2024 at 12:30:09PM +0300, Dan Carpenter wrote:
> > Goto the clean up path to clean up a couple clocks before returning
> > on this error path.
> 
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Thank you for fixing this!

Btw, alternatively it may be switched to use devm_clk_get_enabled().

-- 
With Best Regards,
Andy Shevchenko



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

end of thread, other threads:[~2024-03-18 10:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-16  9:30 [PATCH] serial: 8250_lpc18xx: disable clks on error in probe() Dan Carpenter
2024-03-18 10:03 ` Andy Shevchenko
2024-03-18 10:22   ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.