]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
serial: 8250_lpc18xx: disable clks on error in probe()
authorDan Carpenter <dan.carpenter@linaro.org>
Sat, 16 Mar 2024 09:30:09 +0000 (12:30 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Apr 2024 13:52:47 +0000 (15:52 +0200)
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>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/92646c10-e0b5-4117-a9ac-ce9987d33ce3@moroto.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_lpc18xx.c

index 7984ee05af1dada214e275062a5c831d9a66144c..47e1a056a60c34b49f37dc4aa0f0c3963bf78bef 100644 (file)
@@ -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;