summaryrefslogtreecommitdiff
path: root/drivers/clk/clk-s2mps11.c
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2013-08-29 12:10:51 +0100
committerMike Turquette <mturquette@linaro.org>2013-08-30 12:52:01 -0700
commit903efc553f738030a4ffa23fa03e7f329655c1c2 (patch)
tree3c0b612bf3889b07fd8b571ad5e35c9659ffb7c3 /drivers/clk/clk-s2mps11.c
parent08442ce993deeb15a070c14cc3f3459e87d111e0 (diff)
clk: fix new_parent dereference before null check
Commit 71472c0 (clk: add support for clock reparent on set_rate) added a dereference of the new_parent pointer in clk_reparent(), but as detected by smatch clk_reparent() later checks whether new_parent is NULL. The dereference was in order to clear the new parent's new_child pointer to avoid duplicate POST_RATE_CHANGE notifications, so clearly isn't necessary if the new parent is NULL, so move it inside the "if (new_parent)" block. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/clk-s2mps11.c')
0 files changed, 0 insertions, 0 deletions