diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 03820467fbba86bce711873f847268030cb93928..da7c9a523f02efd4d5dd26c5771ff178eab7969d 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1066,6 +1066,9 @@ static int clk_fetch_parent_index(struct clk_core *core, { int i; + if (!parent) + return -EINVAL; + /* * find index of new parent clock using cached parent ptrs, * or if not yet cached, use string name comparison and cache