* Fwd: [PATCH] tty:Insert clk_put before return (clk) to release memory
[not found] <tencent_EF85BF6D0EE7D05E10D527FD335467508106@qq.com>
@ 2023-07-14 4:30 ` liubin001
2023-07-14 4:44 ` Greg KH
2023-07-14 11:48 ` Ilpo Järvinen
0 siblings, 2 replies; 3+ messages in thread
From: liubin001 @ 2023-07-14 4:30 UTC (permalink / raw)
To: gregkh; +Cc: linux-serial, linux-kernel
tty/serial:Insert clk_put before return (clk) to release memory
Signed-off-by: Liu Bin <liubin001@08suo.com>
---
drivers/tty/serial/bcm63xx_uart.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/tty/serial/bcm63xx_uart.c
b/drivers/tty/serial/bcm63xx_uart.c
index 55e82d0bf92d..7353b683952d 100644
--- a/drivers/tty/serial/bcm63xx_uart.c
+++ b/drivers/tty/serial/bcm63xx_uart.c
@@ -851,6 +851,7 @@ static int bcm_uart_probe(struct platform_device
*pdev)
clk = of_clk_get(pdev->dev.of_node, 0);
if (IS_ERR(clk))
+ clk_put(clk);
return -ENODEV;
port->iotype = UPIO_MEM;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fwd: [PATCH] tty:Insert clk_put before return (clk) to release memory
2023-07-14 4:30 ` Fwd: [PATCH] tty:Insert clk_put before return (clk) to release memory liubin001
@ 2023-07-14 4:44 ` Greg KH
2023-07-14 11:48 ` Ilpo Järvinen
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2023-07-14 4:44 UTC (permalink / raw)
To: liubin001; +Cc: linux-serial, linux-kernel
On Fri, Jul 14, 2023 at 12:30:14PM +0800, liubin001@208suo.com wrote:
>
> tty/serial:Insert clk_put before return (clk) to release memory
> Signed-off-by: Liu Bin <liubin001@08suo.com>
> ---
> drivers/tty/serial/bcm63xx_uart.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/tty/serial/bcm63xx_uart.c
> b/drivers/tty/serial/bcm63xx_uart.c
> index 55e82d0bf92d..7353b683952d 100644
> --- a/drivers/tty/serial/bcm63xx_uart.c
> +++ b/drivers/tty/serial/bcm63xx_uart.c
> @@ -851,6 +851,7 @@ static int bcm_uart_probe(struct platform_device *pdev)
> clk = of_clk_get(pdev->dev.of_node, 0);
>
> if (IS_ERR(clk))
> + clk_put(clk);
> return -ENODEV;
>
> port->iotype = UPIO_MEM;
This obviously has not even been tested :(
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fwd: [PATCH] tty:Insert clk_put before return (clk) to release memory
2023-07-14 4:30 ` Fwd: [PATCH] tty:Insert clk_put before return (clk) to release memory liubin001
2023-07-14 4:44 ` Greg KH
@ 2023-07-14 11:48 ` Ilpo Järvinen
1 sibling, 0 replies; 3+ messages in thread
From: Ilpo Järvinen @ 2023-07-14 11:48 UTC (permalink / raw)
To: liubin001; +Cc: gregkh, linux-serial, linux-kernel
On Fri, 14 Jul 2023, liubin001@208suo.com wrote:
>
> tty/serial:Insert clk_put before return (clk) to release memory
> Signed-off-by: Liu Bin <liubin001@08suo.com>
> ---
> drivers/tty/serial/bcm63xx_uart.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/tty/serial/bcm63xx_uart.c
> b/drivers/tty/serial/bcm63xx_uart.c
> index 55e82d0bf92d..7353b683952d 100644
> --- a/drivers/tty/serial/bcm63xx_uart.c
> +++ b/drivers/tty/serial/bcm63xx_uart.c
> @@ -851,6 +851,7 @@ static int bcm_uart_probe(struct platform_device *pdev)
> clk = of_clk_get(pdev->dev.of_node, 0);
>
> if (IS_ERR(clk))
> + clk_put(clk);
> return -ENODEV;
Braces missing... Didn't checkpatch complain about this?
--
i.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-14 11:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <tencent_EF85BF6D0EE7D05E10D527FD335467508106@qq.com>
2023-07-14 4:30 ` Fwd: [PATCH] tty:Insert clk_put before return (clk) to release memory liubin001
2023-07-14 4:44 ` Greg KH
2023-07-14 11:48 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome