Patch "serial: pic32: fix missing clk_disable_unprepare() on error in pic32_uart_startup()" has been added to the 5.18-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    serial: pic32: fix missing clk_disable_unprepare() on error in pic32_uart_startup()

to the 5.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     serial-pic32-fix-missing-clk_disable_unprepare-on-er.patch
and it can be found in the queue-5.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e4e7f65f7283c6cb5894b1c8c0c2ac545eeb4ea6
Author: Yang Yingliang <yangyingliang@xxxxxxxxxx>
Date:   Wed May 25 10:12:04 2022 +0800

    serial: pic32: fix missing clk_disable_unprepare() on error in pic32_uart_startup()
    
    [ Upstream commit 6f3cdf2bf1ba9b70de6c2921a415951a0d59873b ]
    
    Fix the missing clk_disable_unprepare() before return
    from pic32_uart_startup() in the error handling case.
    
    Fixes: 157b9394709e ("serial: pic32_uart: Add PIC32 UART driver")
    Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
    Reviewed-by: Jiri Slaby <jirislaby@xxxxxxxxxx>
    Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220525021204.2407631-1-yangyingliang@xxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c
index e3535bd8c8a2..a967b586a0a0 100644
--- a/drivers/tty/serial/pic32_uart.c
+++ b/drivers/tty/serial/pic32_uart.c
@@ -427,7 +427,7 @@ static int pic32_uart_startup(struct uart_port *port)
 	if (!sport->irq_fault_name) {
 		dev_err(port->dev, "%s: kasprintf err!", __func__);
 		ret = -ENOMEM;
-		goto out_done;
+		goto out_disable_clk;
 	}
 	irq_set_status_flags(sport->irq_fault, IRQ_NOAUTOEN);
 	ret = request_irq(sport->irq_fault, pic32_uart_fault_interrupt,
@@ -501,6 +501,8 @@ static int pic32_uart_startup(struct uart_port *port)
 out_f:
 	free_irq(sport->irq_fault, port);
 	kfree(sport->irq_fault_name);
+out_disable_clk:
+	clk_disable_unprepare(sport->clk);
 out_done:
 	return ret;
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux