clk: rockchip: Correct the behaviour of restoring cached phase
authorShawn Lin <shawn.lin@rock-chips.com>
Wed, 21 Mar 2018 02:39:20 +0000 (10:39 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Fri, 23 Mar 2018 08:02:58 +0000 (09:02 +0100)
commit570fda972b3178f9a981d1b7ac18e05245a52eab
treec00a3df5d82d90834f68d615b1fa98fccced849b
parentce84eca927af24ca27897ba5fee4fbeed443d5fc
clk: rockchip: Correct the behaviour of restoring cached phase

We can't restore every phase, for instance the invalid phase and
the phase for coming rate which is out of the scope of boards'
ability. And this patch also corrects the error path to return
invalid pointer to clk if clk_notifier_register failed introduced
by the same offending commit.

Fixes: 60cf09e45fbc ("clk: rockchip: Restore the clock phase after the rate was changed")
Reported-by: wlq <wlq@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Tested-by: wlq <wlq@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
drivers/clk/rockchip/clk-mmc-phase.c