From: Greg KH <gregkh@linuxfoundation.org>
To: sunran001@208suo.com
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: serial: add missing clk_put()
Date: Tue, 18 Jul 2023 15:25:15 +0200 [thread overview]
Message-ID: <2023071845-playable-snippet-278a@gregkh> (raw)
In-Reply-To: <047273ae4e4c25eb7b81fd69d761161e@208suo.com>
On Tue, Jul 18, 2023 at 03:55:23PM +0800, sunran001@208suo.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@208suo.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
prev parent reply other threads:[~2023-07-18 13:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230718075401.16668-1-xujianghui@cdjrlc.com>
2023-07-18 7:55 ` [PATCH] tty: serial: add missing clk_put() sunran001
2023-07-18 8:40 ` Dmitry Baryshkov
2023-07-18 13:25 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2023071845-playable-snippet-278a@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=sunran001@208suo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox