diff options
author | Gustavo A. R. Silva <garsilva@embeddedor.com> | 2017-12-06 14:20:15 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-12 12:32:13 +0200 |
commit | b72d39b1da82573654b4b4ce938cc6d3d3b89057 (patch) | |
tree | d3b569787eed1621b03be6e3af78aec8fd820590 /crypto/algif_hash.c | |
parent | e6bc3a4b0c23ed8d754692fa15ceb280e3facc51 (diff) |
PM / devfreq: Fix potential NULL pointer dereference in governor_store
[ Upstream commit 63f1e05f7fe9ca509c60154d6a833abf96eecdc9 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto/algif_hash.c')
0 files changed, 0 insertions, 0 deletions