From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: linux-kernel@vger.kernel.org
Cc: Amarula patchwork <linux-amarula@amarulasolutions.com>,
michael@amarulasolutions.com,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Tero Kristo <kristo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Tony Lindgren <tony@atomide.com>,
linux-clk@vger.kernel.org, linux-omap@vger.kernel.org
Subject: [PATCH] clk: ti: mux: don't free `parent_names' on kzalloc() failure
Date: Mon, 17 Oct 2022 18:46:46 +0200 [thread overview]
Message-ID: <20221017164646.4193618-1-dario.binacchi@amarulasolutions.com> (raw)
Although no operation is performed by kfree() on a NULL pointer, it's
however suboptimal and semantically wrong doing it.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
drivers/clk/ti/mux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/ti/mux.c b/drivers/clk/ti/mux.c
index 46b45b3e8319..1f924db2ad98 100644
--- a/drivers/clk/ti/mux.c
+++ b/drivers/clk/ti/mux.c
@@ -182,7 +182,7 @@ static void of_mux_clk_setup(struct device_node *node)
}
parent_names = kzalloc((sizeof(char *) * num_parents), GFP_KERNEL);
if (!parent_names)
- goto cleanup;
+ return;
of_clk_parent_fill(node, parent_names, num_parents);
--
2.32.0
next reply other threads:[~2022-10-17 16:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 16:46 Dario Binacchi [this message]
2022-10-28 0:41 ` Stephen Boyd
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=20221017164646.4193618-1-dario.binacchi@amarulasolutions.com \
--to=dario.binacchi@amarulasolutions.com \
--cc=gregkh@linuxfoundation.org \
--cc=kristo@kernel.org \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=michael@amarulasolutions.com \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=tony@atomide.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®