1
0
Fork 0
alistair23-linux/drivers/devfreq
Leonard Crestez 33191a1bd6 PM / devfreq: Don't fail devfreq_dev_release if not in list
[ Upstream commit 42a6b25e67 ]

Right now devfreq_dev_release will print a warning and abort the rest of
the cleanup if the devfreq instance is not part of the global
devfreq_list. But this is a valid scenario, for example it can happen if
the governor can't be found or on any other init error that happens
after device_register.

Initialize devfreq->node to an empty list head in devfreq_add_device so
that list_del becomes a safe noop inside devfreq_dev_release and we can
continue the rest of the cleanup.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-09 10:19:43 +01:00
..
event PM / devfreq: events: extend events by type of counted data 2019-08-25 12:44:38 +09:00
Kconfig PM / devfreq: tegra20: add COMMON_CLK dependency 2019-08-24 20:11:12 +09:00
Makefile PM / devfreq: Introduce driver for NVIDIA Tegra20 2019-08-24 20:11:12 +09:00
devfreq-event.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
devfreq.c PM / devfreq: Don't fail devfreq_dev_release if not in list 2020-01-09 10:19:43 +01:00
exynos-bus.c PM / devfreq: exynos-bus: Convert to use dev_pm_opp_set_rate() 2019-08-25 12:46:48 +09:00
governor.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
governor_passive.c PM / devfreq: passive: fix compiler warning 2019-08-26 21:37:37 +09:00
governor_performance.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
governor_powersave.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
governor_simpleondemand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
governor_userspace.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rk3399_dmc.c PM / devfreq: rk3399_dmc: Fix spelling typo 2019-08-24 20:11:12 +09:00
tegra20-devfreq.c PM / devfreq: Introduce driver for NVIDIA Tegra20 2019-08-24 20:11:12 +09:00
tegra30-devfreq.c PM / devfreq: tegra: Rename tegra-devfreq.c to tegra30-devfreq.c 2019-08-24 20:11:12 +09:00