From: Jiri Slaby <jirislaby@kernel.org>
To: Yang Yingliang <yangyingliang@huawei.com>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Cc: gregkh@linuxfoundation.org
Subject: Re: [PATCH -next] serial: pic32: fix missing clk_disable_unprepare() on error in pic32_uart_startup()
Date: Wed, 25 May 2022 07:49:48 +0200 [thread overview]
Message-ID: <5a3246cd-9edb-659f-8332-df7bcce3c13a@kernel.org> (raw)
In-Reply-To: <20220525021204.2407631-1-yangyingliang@huawei.com>
On 25. 05. 22, 4:12, Yang Yingliang wrote:
> 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@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
> ---
> drivers/tty/serial/pic32_uart.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c
> index b399aac530fe..f418f1de66b3 100644
> --- a/drivers/tty/serial/pic32_uart.c
> +++ b/drivers/tty/serial/pic32_uart.c
> @@ -503,7 +503,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,
> @@ -579,6 +579,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;
> }
--
js
suse labs
prev parent reply other threads:[~2022-05-25 5:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 2:12 [PATCH -next] serial: pic32: fix missing clk_disable_unprepare() on error in pic32_uart_startup() Yang Yingliang
2022-05-25 5:49 ` Jiri Slaby [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=5a3246cd-9edb-659f-8332-df7bcce3c13a@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=yangyingliang@huawei.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