diff options
-rw-r--r-- | arch/blackfin/mach-common/smp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index e6e3429d92b0..349ee3f5466a 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
@@ -211,6 +211,8 @@ int smp_call_function(void (*func)(void *info), void *info, int wait) | |||
211 | return 0; | 211 | return 0; |
212 | 212 | ||
213 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 213 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); |
214 | if (!msg) | ||
215 | return -ENOMEM; | ||
214 | INIT_LIST_HEAD(&msg->list); | 216 | INIT_LIST_HEAD(&msg->list); |
215 | msg->call_struct.func = func; | 217 | msg->call_struct.func = func; |
216 | msg->call_struct.info = info; | 218 | msg->call_struct.info = info; |
@@ -252,6 +254,8 @@ int smp_call_function_single(int cpuid, void (*func) (void *info), void *info, | |||
252 | cpu_set(cpu, callmap); | 254 | cpu_set(cpu, callmap); |
253 | 255 | ||
254 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 256 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); |
257 | if (!msg) | ||
258 | return -ENOMEM; | ||
255 | INIT_LIST_HEAD(&msg->list); | 259 | INIT_LIST_HEAD(&msg->list); |
256 | msg->call_struct.func = func; | 260 | msg->call_struct.func = func; |
257 | msg->call_struct.info = info; | 261 | msg->call_struct.info = info; |
@@ -287,6 +291,8 @@ void smp_send_reschedule(int cpu) | |||
287 | return; | 291 | return; |
288 | 292 | ||
289 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 293 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); |
294 | if (!msg) | ||
295 | return; | ||
290 | memset(msg, 0, sizeof(msg)); | 296 | memset(msg, 0, sizeof(msg)); |
291 | INIT_LIST_HEAD(&msg->list); | 297 | INIT_LIST_HEAD(&msg->list); |
292 | msg->type = BFIN_IPI_RESCHEDULE; | 298 | msg->type = BFIN_IPI_RESCHEDULE; |
@@ -314,6 +320,8 @@ void smp_send_stop(void) | |||
314 | return; | 320 | return; |
315 | 321 | ||
316 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 322 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); |
323 | if (!msg) | ||
324 | return; | ||
317 | memset(msg, 0, sizeof(msg)); | 325 | memset(msg, 0, sizeof(msg)); |
318 | INIT_LIST_HEAD(&msg->list); | 326 | INIT_LIST_HEAD(&msg->list); |
319 | msg->type = BFIN_IPI_CPU_STOP; | 327 | msg->type = BFIN_IPI_CPU_STOP; |