diff options
-rw-r--r-- | drivers/video/ipu_common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c index 96229da502..889085aa76 100644 --- a/drivers/video/ipu_common.c +++ b/drivers/video/ipu_common.c @@ -132,8 +132,12 @@ struct clk *clk_get_parent(struct clk *clk) int clk_set_rate(struct clk *clk, unsigned long rate) { - if (clk && clk->set_rate) + if (!clk) + return 0; + + if (clk->set_rate) clk->set_rate(clk, rate); + return clk->rate; } |