ACPI / acpi_pad: Used PTR_RET
authorAlexandru Gheorghiu <gheorghiuandru@gmail.com>
Tue, 12 Mar 2013 08:32:51 +0000 (08:32 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 24 Mar 2013 23:13:15 +0000 (00:13 +0100)
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>
drivers/acpi/acpi_pad.c

index 31de1043eea051ca34859193b5ae0afd9d70c2d5..27bb6a91de5f6cf257fd85562fb12bcc033baecc 100644 (file)
@@ -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