From: Markus Elfring <Markus.Elfring@web.de>
To: linux-serial@vger.kernel.org,
"Alexander Stein" <alexander.stein@ew.tq-group.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Peng Fan" <peng.fan@nxp.com>, "Sherry Sun" <sherry.sun@nxp.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] tty: serial: fsl_lpuart: Use common code in lpuart_global_reset()
Date: Wed, 25 Sep 2024 16:45:06 +0200 [thread overview]
Message-ID: <f1216028-ef38-4f05-996b-bafc71777abd@web.de> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 25 Sep 2024 16:36:20 +0200
Add a label so that two statements can be better reused at the end of
this function implementation.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/tty/serial/fsl_lpuart.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 77efa7ee6eda..b63419c1a4ea 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -2811,8 +2811,7 @@ static int lpuart_global_reset(struct lpuart_port *sport)
port)) {
dev_warn(sport->port.dev,
"timeout waiting for transmit engine to complete\n");
- clk_disable_unprepare(sport->ipg_clk);
- return 0;
+ goto disable_unprepare_clk;
}
}
@@ -2828,7 +2827,7 @@ static int lpuart_global_reset(struct lpuart_port *sport)
lpuart32_write(port, ctrl, UARTCTRL);
}
}
-
+disable_unprepare_clk:
clk_disable_unprepare(sport->ipg_clk);
return 0;
}
--
2.46.1
reply other threads:[~2024-09-25 14:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=f1216028-ef38-4f05-996b-bafc71777abd@web.de \
--to=markus.elfring@web.de \
--cc=alexander.stein@ew.tq-group.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=sherry.sun@nxp.com \
--cc=u.kleine-koenig@baylibre.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
all inboxes | Powered by JetHome®