summaryrefslogtreecommitdiff
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2019-12-22 20:41:32 +0300
committerChanwoo Choi <cw00.choi@samsung.com>2019-12-30 03:59:06 +0300
commit6c315d8fe3c931e1f2e7c34c8d81d6016db8f978 (patch)
tree127184e947f2532ac9eb9bcf434fa04b498cb552 /drivers/devfreq
parent39a6e4739c19d5334e552d71ceca544ed84f4b87 (diff)
downloadlinux-6c315d8fe3c931e1f2e7c34c8d81d6016db8f978.tar.xz
PM / devfreq: exynos-bus: Disable devfreq-event device when fails
The exynos_bus_profile_init process may fail, but the devfreq event device remains enabled. Call devfreq_event_disable_edev on the error return path. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/exynos-bus.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index 7f5917d59072..1259a0da7db7 100644
--- a/drivers/devfreq/exynos-bus.c
+++ b/drivers/devfreq/exynos-bus.c
@@ -335,10 +335,16 @@ static int exynos_bus_profile_init(struct exynos_bus *bus,
ret = exynos_bus_set_event(bus);
if (ret < 0) {
dev_err(dev, "failed to set event to devfreq-event devices\n");
- return ret;
+ goto err_edev;
}
return 0;
+
+err_edev:
+ if (exynos_bus_disable_edev(bus))
+ dev_warn(dev, "failed to disable the devfreq-event devices\n");
+
+ return ret;
}
static int exynos_bus_profile_init_passive(struct exynos_bus *bus,