From: james.hogan@imgtec.com (James Hogan)
To: linux-arm-kernel@lists.infradead.org
Subject: clk: move some parent related functions upwards
Date: Thu, 29 Aug 2013 12:02:34 +0100 [thread overview]
Message-ID: <521F2A4A.5040208@imgtec.com> (raw)
In-Reply-To: <20130829104847.GA27486@elgon.mountain>
Hi Dan,
On 29/08/13 11:48, Dan Carpenter wrote:
> Hello James Hogan,
>
> This is a semi-automatic email about new static checker warnings.
>
> The patch 4935b22c46ea: "clk: move some parent related functions
> upwards" from Jul 29, 2013, leads to the following Smatch complaint:
>
> drivers/clk/clk.c:1160 __clk_set_parent()
> warn: variable dereferenced before check 'parent' (see line 1156)
>
> drivers/clk/clk.c
> 1155 flags = clk_enable_lock();
> 1156 clk_reparent(clk, parent);
> ^^^^^^
> Patch addes dereference.
>
> 1157 clk_enable_unlock(flags);
> 1158
> 1159 /* change clock input source */
> 1160 if (parent && clk->ops->set_parent)
> ^^^^^^
> Patch adds a check.
>
> 1161 ret = clk->ops->set_parent(clk->hw, p_index);
> 1162
>
> Also the caller has similar issues. Could you CC me if you send a fix?
>
> regards,
> dan carpenter
>
This one is the same problem as the "clk: add support for clock reparent
on set_rate" one that you reported yesterday (for which I am about to
send a fix - I'll Cc you). This particular patch merely moves some
related code without changing anything.
Cheers
James
parent reply other threads:[~2013-08-29 11:02 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20130829104847.GA27486@elgon.mountain>]
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=521F2A4A.5040208@imgtec.com \
--to=james.hogan@imgtec.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.