Skip to content

Commit

Permalink
ACPI / acpi_pad: Used PTR_RET
Browse files Browse the repository at this point in the history
Use PTR_RET instead of explicit checking with IS_ERR.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Alexandru Gheorghiu authored and Rafael J. Wysocki committed Mar 24, 2013
1 parent 2f9b06f commit a145818
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/acpi_pad.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ static int create_power_saving_task(void)
ps_tsks[ps_tsk_num] = kthread_run(power_saving_thread,
(void *)(unsigned long)ps_tsk_num,
"acpi_pad/%d", ps_tsk_num);
rc = IS_ERR(ps_tsks[ps_tsk_num]) ? PTR_ERR(ps_tsks[ps_tsk_num]) : 0;
rc = PTR_RET(ps_tsks[ps_tsk_num]);
if (!rc)
ps_tsk_num++;
else
Expand Down

0 comments on commit a145818

Please sign in to comment.