soc: rockchip: power-domain: use pm_genpd_remove in error cleanup
authorHeiko Stuebner <heiko@sntech.de>
Thu, 15 Sep 2016 22:14:38 +0000 (00:14 +0200)
committerHeiko Stuebner <heiko@sntech.de>
Fri, 11 Nov 2016 01:14:59 +0000 (02:14 +0100)
commit79d12b7a7f227ed51dd86b16a7536b391e46f7b0
tree4c173503c607da895d58b4aac2edd7bd830770a1
parente4c8cd82d5e1146590611c393001d846535bac5b
soc: rockchip: power-domain: use pm_genpd_remove in error cleanup

The newly introduced pm_genpd_remove reverts the initialization done
by pm_genpd_init and is necessary in the error path of the rockchip
power-domain driver.

Without it the driver will in the error case cleanup the devm-allocated
structures including the elements referenced in the gpd_list thus making
deactivation of unused domains (and probably later genpd accesses as
well) fail by accessing invalid pointers.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
drivers/soc/rockchip/pm_domains.c