linux/drivers/devfreq
Gustavo A. R. Silva 63f1e05f7f PM / devfreq: Fix potential NULL pointer dereference in governor_store
df->governor is being dereferenced before it is null checked,
hence there is a potential null pointer dereference.

Notice that df->governor is being null checked at line 1004:
if (df->governor) {, which implies it might be null.

Fix this by null checking df->governor before dereferencing it.

Addresses-Coverity-ID: 1401988 ("Dereference before null check")
Fixes: bcf23c79c4 ("PM / devfreq: Fix available_governor sysfs")
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2018-01-02 09:36:54 +09:00
..
event
devfreq-event.c
devfreq.c PM / devfreq: Fix potential NULL pointer dereference in governor_store 2018-01-02 09:36:54 +09:00
exynos-bus.c
governor_passive.c
governor_performance.c
governor_powersave.c
governor_simpleondemand.c
governor_userspace.c
governor.h
Kconfig
Makefile
rk3399_dmc.c
tegra-devfreq.c