oprofile: fix CPU unplug panic in ppro_stop()

If oprofile statically compiled in kernel, a cpu unplug triggers
a panic in ppro_stop(), because a NULL pointer is dereferenced.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>

authored by

Eric Dumazet and committed by
Robert Richter
9ea84ad7 061e41fd

+4
+4
arch/x86/oprofile/op_model_ppro.c
··· 156 156 unsigned int low, high; 157 157 int i; 158 158 159 + if (!reset_value) 160 + return; 159 161 for (i = 0; i < num_counters; ++i) { 160 162 if (reset_value[i]) { 161 163 CTRL_READ(low, high, msrs, i); ··· 173 171 unsigned int low, high; 174 172 int i; 175 173 174 + if (!reset_value) 175 + return; 176 176 for (i = 0; i < num_counters; ++i) { 177 177 if (!reset_value[i]) 178 178 continue;