diff options
author | 2017-12-06 14:20:15 -0600 | |
---|---|---|
committer | 2018-01-02 09:36:54 +0900 | |
commit | 63f1e05f7fe9ca509c60154d6a833abf96eecdc9 (patch) | |
tree | c7166465e745e3d073bf07b578bff73cd28394a8 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | PM / devfreq: Propagate error from devfreq_add_device() (diff) | |
download | linux-rng-63f1e05f7fe9ca509c60154d6a833abf96eecdc9.tar.xz linux-rng-63f1e05f7fe9ca509c60154d6a833abf96eecdc9.zip |
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: bcf23c79c4e4 ("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>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions