diff options
Diffstat (limited to 'arch/s390/oprofile')
-rw-r--r-- | arch/s390/oprofile/hwsampler.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/s390/oprofile/hwsampler.c b/arch/s390/oprofile/hwsampler.c index 276f2e26c761..e53c6f268807 100644 --- a/arch/s390/oprofile/hwsampler.c +++ b/arch/s390/oprofile/hwsampler.c | |||
@@ -209,13 +209,11 @@ static void init_all_cpu_buffers(void) | |||
209 | } | 209 | } |
210 | } | 210 | } |
211 | 211 | ||
212 | static int prepare_cpu_buffers(void) | 212 | static void prepare_cpu_buffers(void) |
213 | { | 213 | { |
214 | int cpu; | ||
215 | int rc; | ||
216 | struct hws_cpu_buffer *cb; | 214 | struct hws_cpu_buffer *cb; |
215 | int cpu; | ||
217 | 216 | ||
218 | rc = 0; | ||
219 | for_each_online_cpu(cpu) { | 217 | for_each_online_cpu(cpu) { |
220 | cb = &per_cpu(sampler_cpu_buffer, cpu); | 218 | cb = &per_cpu(sampler_cpu_buffer, cpu); |
221 | atomic_set(&cb->ext_params, 0); | 219 | atomic_set(&cb->ext_params, 0); |
@@ -230,8 +228,6 @@ static int prepare_cpu_buffers(void) | |||
230 | cb->oom = 0; | 228 | cb->oom = 0; |
231 | cb->stop_mode = 0; | 229 | cb->stop_mode = 0; |
232 | } | 230 | } |
233 | |||
234 | return rc; | ||
235 | } | 231 | } |
236 | 232 | ||
237 | /* | 233 | /* |
@@ -1107,9 +1103,7 @@ int hwsampler_start_all(unsigned long rate) | |||
1107 | if (rc) | 1103 | if (rc) |
1108 | goto start_all_exit; | 1104 | goto start_all_exit; |
1109 | 1105 | ||
1110 | rc = prepare_cpu_buffers(); | 1106 | prepare_cpu_buffers(); |
1111 | if (rc) | ||
1112 | goto start_all_exit; | ||
1113 | 1107 | ||
1114 | for_each_online_cpu(cpu) { | 1108 | for_each_online_cpu(cpu) { |
1115 | rc = start_sampling(cpu); | 1109 | rc = start_sampling(cpu); |
@@ -1156,7 +1150,7 @@ int hwsampler_stop_all(void) | |||
1156 | rc = 0; | 1150 | rc = 0; |
1157 | if (hws_state == HWS_INIT) { | 1151 | if (hws_state == HWS_INIT) { |
1158 | mutex_unlock(&hws_sem); | 1152 | mutex_unlock(&hws_sem); |
1159 | return rc; | 1153 | return 0; |
1160 | } | 1154 | } |
1161 | hws_state = HWS_STOPPING; | 1155 | hws_state = HWS_STOPPING; |
1162 | mutex_unlock(&hws_sem); | 1156 | mutex_unlock(&hws_sem); |