From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
To: Wang Qing <wangqing@vivo.com>,
Hartley Sweeten <hsweeten@visionengravers.com>,
Russell King <linux@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm: Add clk_get_rate input parameter null check
Date: Fri, 06 Nov 2020 06:57:49 +0100 [thread overview]
Message-ID: <15cc973a481dea85081c4466b18df6a3e0cb280f.camel@gmail.com> (raw)
In-Reply-To: <1604627175-16710-1-git-send-email-wangqing@vivo.com>
Hello Wang!
On Fri, 2020-11-06 at 09:46 +0800, Wang Qing wrote:
> The input parameter of clk_get_rate() is checked with IS_ERR(),
> so here we need to check null on clk.
Thank you for the patch!
> Signed-off-by: Wang Qing <wangqing@vivo.com>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> ---
> arch/arm/mach-ep93xx/clock.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-
> ep93xx/clock.c
> index 2810eb5..4313b2f
> --- a/arch/arm/mach-ep93xx/clock.c
> +++ b/arch/arm/mach-ep93xx/clock.c
> @@ -321,6 +321,9 @@ static unsigned long get_uart_rate(struct clk
> *clk)
>
> unsigned long clk_get_rate(struct clk *clk)
> {
> + if (!clk)
> + return 0;
> +
> if (clk->get_rate)
> return clk->get_rate(clk);
>
--
Alexander Sverdlin.
prev parent reply other threads:[~2020-11-06 5:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 1:46 [PATCH] arm: Add clk_get_rate input parameter null check Wang Qing
2020-11-06 5:57 ` Alexander Sverdlin [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=15cc973a481dea85081c4466b18df6a3e0cb280f.camel@gmail.com \
--to=alexander.sverdlin@gmail.com \
--cc=hsweeten@visionengravers.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=wangqing@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;
as well as URLs for NNTP newsgroup(s).