aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/cpuidle/sysfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c
index 832a2c3f01ff..c5adc8c9ac43 100644
--- a/drivers/cpuidle/sysfs.c
+++ b/drivers/cpuidle/sysfs.c
@@ -403,8 +403,10 @@ static int cpuidle_add_state_sysfs(struct cpuidle_device *device)
403 /* state statistics */ 403 /* state statistics */
404 for (i = 0; i < drv->state_count; i++) { 404 for (i = 0; i < drv->state_count; i++) {
405 kobj = kzalloc(sizeof(struct cpuidle_state_kobj), GFP_KERNEL); 405 kobj = kzalloc(sizeof(struct cpuidle_state_kobj), GFP_KERNEL);
406 if (!kobj) 406 if (!kobj) {
407 ret = -ENOMEM;
407 goto error_state; 408 goto error_state;
409 }
408 kobj->state = &drv->states[i]; 410 kobj->state = &drv->states[i];
409 kobj->state_usage = &device->states_usage[i]; 411 kobj->state_usage = &device->states_usage[i];
410 init_completion(&kobj->kobj_unregister); 412 init_completion(&kobj->kobj_unregister);