clk: fix possible null pointer dereference

The commit 646cafc6 (clk: Change clk_ops->determine_rate to
return a clk_hw as the best parent) opens a possibility for
null pointer dereference, fix this.

Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michael Turquette <mturquette@linaro.org>

authored by Stanimir Varbanov and committed by Michael Turquette c7662fc5 176a107b

Changed files
+1 -1
drivers
clk
+1 -1
drivers/clk/clk.c
··· 1366 1366 new_rate = clk->ops->determine_rate(clk->hw, rate, 1367 1367 &best_parent_rate, 1368 1368 &parent_hw); 1369 - parent = parent_hw->clk; 1369 + parent = parent_hw ? parent_hw->clk : NULL; 1370 1370 } else if (clk->ops->round_rate) { 1371 1371 new_rate = clk->ops->round_rate(clk->hw, rate, 1372 1372 &best_parent_rate);