diff options
-rw-r--r-- | kernel/taskstats.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/taskstats.c b/kernel/taskstats.c index 1db6808c494b..9f4618eb51c8 100644 --- a/kernel/taskstats.c +++ b/kernel/taskstats.c | |||
@@ -290,6 +290,7 @@ static int add_del_listener(pid_t pid, const struct cpumask *mask, int isadd) | |||
290 | struct listener_list *listeners; | 290 | struct listener_list *listeners; |
291 | struct listener *s, *tmp, *s2; | 291 | struct listener *s, *tmp, *s2; |
292 | unsigned int cpu; | 292 | unsigned int cpu; |
293 | int ret = 0; | ||
293 | 294 | ||
294 | if (!cpumask_subset(mask, cpu_possible_mask)) | 295 | if (!cpumask_subset(mask, cpu_possible_mask)) |
295 | return -EINVAL; | 296 | return -EINVAL; |
@@ -304,9 +305,10 @@ static int add_del_listener(pid_t pid, const struct cpumask *mask, int isadd) | |||
304 | for_each_cpu(cpu, mask) { | 305 | for_each_cpu(cpu, mask) { |
305 | s = kmalloc_node(sizeof(struct listener), | 306 | s = kmalloc_node(sizeof(struct listener), |
306 | GFP_KERNEL, cpu_to_node(cpu)); | 307 | GFP_KERNEL, cpu_to_node(cpu)); |
307 | if (!s) | 308 | if (!s) { |
309 | ret = -ENOMEM; | ||
308 | goto cleanup; | 310 | goto cleanup; |
309 | 311 | } | |
310 | s->pid = pid; | 312 | s->pid = pid; |
311 | s->valid = 1; | 313 | s->valid = 1; |
312 | 314 | ||
@@ -339,7 +341,7 @@ cleanup: | |||
339 | } | 341 | } |
340 | up_write(&listeners->sem); | 342 | up_write(&listeners->sem); |
341 | } | 343 | } |
342 | return 0; | 344 | return ret; |
343 | } | 345 | } |
344 | 346 | ||
345 | static int parse(struct nlattr *na, struct cpumask *mask) | 347 | static int parse(struct nlattr *na, struct cpumask *mask) |