lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2023071845-playable-snippet-278a@gregkh>
Date:   Tue, 18 Jul 2023 15:25:15 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     sunran001@...suo.com
Cc:     linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty: serial: add missing clk_put()

On Tue, Jul 18, 2023 at 03:55:23PM +0800, sunran001@...suo.com wrote:
> This patch fixes the following Coccinelle error:
> 
> ./drivers/tty/serial/bcm63xx_uart.c:854:2-8: ERROR: missing clk_put;
> clk_get on line 849 and execution via conditional on line 853
> 
> Signed-off-by: Ran Sun <sunran001@...suo.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;

Ran, as was pointed out before, you obviously didn't even test this
patch, nor any of the other submissions you made.

Please take the time to learn C a bit better, and then start out in a
part of the kernel where basic changes are accepted, like
drivers/staging/ so that you can learn how to properly send patches
(this was incorrectly sent as well.)

Then you can work up to attempting to fix other changes like this, if
they are correct, and you will know how to properly test your changes
instead of just making rote changes like this without understanding the
implications of them.

best of luck!

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ