]> git.openfabrics.org - ~emulex/infiniband.git/commit
clk: core: clk_calc_new_rates handles NULL parents
authorMike Turquette <mturquette@linaro.org>
Mon, 26 Mar 2012 21:45:36 +0000 (14:45 -0700)
committerMike Turquette <mturquette@linaro.org>
Tue, 24 Apr 2012 23:37:37 +0000 (16:37 -0700)
commit7452b2191cd55fb3fd6ad65344466ddcdbe4676e
tree5ce68dcf470dd0de7bac7d354ea7be10e52467d5
parent70d347e6cd0d2a7ecc023b44ef721bc2c2a38f22
clk: core: clk_calc_new_rates handles NULL parents

It is possible to call clk_set_rate on a clock with a NULL parent.  One
such example is an adjustable-rate root clock.  Ensure that
clk_calc_new_rates does not dereference parent without checking first
and also handle the corner cases gracefully.

Reported-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/clk.c