Commit 5493f97
cpufreq: amd-pstate: add check for cpufreq_cpu_get's return value
cpufreq_cpu_get may return NULL. To avoid NULL-dereference check it
and return in case of error.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Anastasia Belova <[email protected]>
Reviewed-by: Perry Yuan <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>1 parent b14ceb8 commit 5493f97
1 file changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
662 | | - | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
663 | 668 | | |
664 | 669 | | |
665 | 670 | | |
| |||
873 | 878 | | |
874 | 879 | | |
875 | 880 | | |
876 | | - | |
| 881 | + | |
877 | 882 | | |
878 | 883 | | |
879 | 884 | | |
880 | 885 | | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
881 | 891 | | |
882 | 892 | | |
883 | 893 | | |
| |||
0 commit comments