clk: handle NULL struct clk gracefully
authorMike Turquette <mturquette@linaro.org>
Thu, 22 Aug 2013 06:58:09 +0000 (23:58 -0700)
committer黄涛 <huangtao@rock-chips.com>
Wed, 8 Jan 2014 03:04:18 +0000 (11:04 +0800)
commit36219fa9edc6b1edc83e2e39cbc97c19d55719b7
tree31f38cb3ce27a47f6b341b0ae364732f2d37a2d2
parent06debd06139a6f844d1bd75990a693b76b2df122
clk: handle NULL struct clk gracefully

At some point changes to clk_set_rate and clk_set_parent introduced a
bug whereby NULL struct clk pointers were treated as an error. This is
in violation of the API in include/linux/clk.h. Reintroduce graceful
handling of NULL clk's by bailing from clk_set_rate and clk_set_parent
with return codes of zero.

Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/clk.c