From: viresh.kumar@linaro.org (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: spear: fix check of clk_get_sys() return value
Date: Tue, 8 Mar 2016 08:38:27 +0700 [thread overview]
Message-ID: <20160308013827.GA13153@vireshk-mac-ubuntu> (raw)
In-Reply-To: <1457393426-14679-1-git-send-email-vz@mleia.com>
On 08-03-16, 01:30, Vladimir Zapolskiy wrote:
> The clk_get_sys() function returns either a valid pointer to
> struct clk or ERR_PTR() error value, this makes invalid a check for
> NULL on error path, fix it.
>
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
> ---
> arch/arm/mach-spear/time.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-spear/time.c b/arch/arm/mach-spear/time.c
> index 9ccffc1..4878ba9 100644
> --- a/arch/arm/mach-spear/time.c
> +++ b/arch/arm/mach-spear/time.c
> @@ -233,7 +233,7 @@ void __init spear_setup_of_timer(void)
> }
>
> gpt_clk = clk_get_sys("gpt0", NULL);
> - if (!gpt_clk) {
> + if (IS_ERR(gpt_clk)) {
> pr_err("%s:couldn't get clk for gpt\n", __func__);
> goto err_iomap;
> }
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
prev parent reply other threads:[~2016-03-08 1:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 23:30 [PATCH] ARM: spear: fix check of clk_get_sys() return value Vladimir Zapolskiy
2016-03-08 1:38 ` Viresh Kumar [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=20160308013827.GA13153@vireshk-mac-ubuntu \
--to=viresh.kumar@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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).