cpupower: Fix NULL but dereferenced coccicheck errors
authorShuah Khan <skhan@linuxfoundation.org>
Mon, 29 Jun 2020 20:02:23 +0000 (14:02 -0600)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 6 Jul 2020 22:11:04 +0000 (16:11 -0600)
commitcbf25270933742c4a6d8671bba5c79a4e879cff3
tree880390fadb922eb46647e3a70d267551df2ca463
parent8e022709c41e55b5b4a9d75a3380b7286c3c588c
cpupower: Fix NULL but dereferenced coccicheck errors

Fix NULL but dereferenced coccicheck errors found by:

make coccicheck MODE=report M=tools/power/cpupower

tools/power/cpupower/lib/cpufreq.c:384:19-23: ERROR: first is NULL but dereferenced.
tools/power/cpupower/lib/cpufreq.c:440:19-23: ERROR: first is NULL but dereferenced.
tools/power/cpupower/lib/cpufreq.c:308:19-23: ERROR: first is NULL but dereferenced.
tools/power/cpupower/lib/cpufreq.c:753:19-23: ERROR: first is NULL but dereferenced.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/power/cpupower/lib/cpufreq.c