Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus
[deliverable/linux.git] / drivers / acpi / acpi_pad.c
index 6230637054c6ccd10c7fd95b999684c6b9752616..fc6008fbce35bd99f390d15af6e7471b1ca0438a 100644 (file)
@@ -231,16 +231,19 @@ static struct task_struct *ps_tsks[NR_CPUS];
 static unsigned int ps_tsk_num;
 static int create_power_saving_task(void)
 {
-       int rc = -ENOMEM;
+       int rc;
 
        ps_tsks[ps_tsk_num] = kthread_run(power_saving_thread,
                (void *)(unsigned long)ps_tsk_num,
                "acpi_pad/%d", ps_tsk_num);
-       rc = PTR_RET(ps_tsks[ps_tsk_num]);
-       if (!rc)
-               ps_tsk_num++;
-       else
+
+       if (IS_ERR(ps_tsks[ps_tsk_num])) {
+               rc = PTR_ERR(ps_tsks[ps_tsk_num]);
                ps_tsks[ps_tsk_num] = NULL;
+       } else {
+               rc = 0;
+               ps_tsk_num++;
+       }
 
        return rc;
 }
This page took 0.032695 seconds and 5 git commands to generate.