clk: clk_set_assigned: Skip frequency of value 0

A frequency of value 0 mean that we don't want to change the frequency so
skip it.
This commit is contained in:
Emmanuel Vadot 2018-05-07 09:42:35 +00:00
parent 08f3f0f953
commit 3914c76abb

View File

@ -1350,7 +1350,7 @@ clk_set_assigned(device_t dev, phandle_t node)
clk_set_assigned_parent(dev, clk, i);
/* Then set a new frequency */
if (i <= nrates)
if (i <= nrates && rates[i] != 0)
clk_set_assigned_rates(dev, clk, rates[i]);
clk_release(clk);