From: Chanwoo Choi <cw00.choi@samsung.com>
To: Aditya Pakki <pakki001@umn.edu>
Cc: kjlu@umn.edu, Sylwester Nawrocki <s.nawrocki@samsung.com>,
Tomasz Figa <tomasz.figa@gmail.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: samsung: Remove redundant check in samsung_cmu_register_one
Date: Wed, 22 Jan 2020 10:00:19 +0900 [thread overview]
Message-ID: <62afcecb-e019-eae2-c92d-a9cb2bc04592@samsung.com> (raw)
In-Reply-To: <20200121233349.28627-1-pakki001@umn.edu>
On 1/22/20 8:33 AM, Aditya Pakki wrote:
> Consistent with other instances of samsung_clk_init, the check
> if ctx is NULL is redundant. The function currently does not
> return NULL.
>
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
> ---
> drivers/clk/samsung/clk.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
> index dad31308c071..1949ae7851b2 100644
> --- a/drivers/clk/samsung/clk.c
> +++ b/drivers/clk/samsung/clk.c
> @@ -356,10 +356,6 @@ struct samsung_clk_provider * __init samsung_cmu_register_one(
> }
>
> ctx = samsung_clk_init(np, reg_base, cmu->nr_clk_ids);
> - if (!ctx) {
> - panic("%s: unable to allocate ctx\n", __func__);
> - return ctx;
> - }
>
> if (cmu->pll_clks)
> samsung_clk_register_pll(ctx, cmu->pll_clks, cmu->nr_pll_clks,
>
If samsung_clk_init() fail to allocate the memory for 'ctx',
call panic() without return. As the patch description,
samsung_clk_init() either call panic() or return
the correct 'ctx' instance. It looks good to me.
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
--
Best Regards,
Chanwoo Choi
Samsung Electronics
next prev parent reply other threads:[~2020-01-22 0:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200121233357epcas1p2ed13efb902d2b30c0ddd426e84351b9f@epcas1p2.samsung.com>
2020-01-21 23:33 ` [PATCH] clk: samsung: Remove redundant check in samsung_cmu_register_one Aditya Pakki
2020-01-22 1:00 ` Chanwoo Choi [this message]
2020-02-12 23:38 ` 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=62afcecb-e019-eae2-c92d-a9cb2bc04592@samsung.com \
--to=cw00.choi@samsung.com \
--cc=kjlu@umn.edu \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=pakki001@umn.edu \
--cc=s.nawrocki@samsung.com \
--cc=sboyd@kernel.org \
--cc=tomasz.figa@gmail.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