From: Stephen Boyd <sboyd@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Yan Zhen <yanzhen@vivo.com>,
andersson@kernel.org, mturquette@baylibre.com,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org, opensource.kernel@vivo.com
Subject: Re: [PATCH v3] clk: qcom: Fix error checking for devm_clk_hw_get_clk()
Date: Thu, 29 Aug 2024 10:42:03 -0700 [thread overview]
Message-ID: <79403fa37a491749b9fcbbffb17ddc8e.sboyd@kernel.org> (raw)
In-Reply-To: <alrspfbadwth4v3f5q4nstjm5phd7ttqxyxx24lyye6lpqclws@v5dfuc2fsp54>
Quoting Dmitry Baryshkov (2024-08-29 02:06:51)
> On Tue, Aug 27, 2024 at 11:18:10AM GMT, Stephen Boyd wrote:
> > Quoting Yan Zhen (2024-08-26 19:52:52)
> > > The devm_clk_hw_get_clk() function returns error pointers.
> > > It never returns NULL. Update the check accordingly.
> >
> > It can return NULL if the 'hw' pointer passed in is NULL.
>
> No, it will crash:
>
> WARN_ON_ONCE(dev != hw->core->dev);
>
> Furthermore, clk_hw_get_clk() also doesn't have NULL checks and will
> crash if NULL is passed as hw.
Ah, thanks. I misread it as clk_hw_create_clk().
next prev parent reply other threads:[~2024-08-29 17:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-27 2:52 [PATCH v3] clk: qcom: Fix error checking for devm_clk_hw_get_clk() Yan Zhen
2024-08-27 18:18 ` Stephen Boyd
2024-08-27 20:08 ` Markus Elfring
2024-08-29 9:06 ` Dmitry Baryshkov
2024-08-29 17:42 ` Stephen Boyd [this message]
2024-08-29 9:07 ` Dmitry Baryshkov
2024-08-29 16:59 ` Christophe JAILLET
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=79403fa37a491749b9fcbbffb17ddc8e.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=andersson@kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=opensource.kernel@vivo.com \
--cc=yanzhen@vivo.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