Quoting MyungJoo Ham <myungjoo....@samsung.com>:

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 <garsi...@embeddedor.com>

Acked-by: MyungJoo Ham <myungjoo....@samsung.com>


Thank you, MyungJoo

--
Gustavo A. R. Silva






Reply via email to