acpi: Replace weird use of PTR_RET.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 15 Jul 2013 01:52:32 +0000 (11:22 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 15 Jul 2013 01:55:02 +0000 (11:25 +0930)
commit5d7e438629413586ab78779751caa6e713c2234c
tree6342df34867bb71718fc242dc19adc3ced0360ad
parent228b82211b47b597fa75dff2ac146b40eaaddf18
acpi: Replace weird use of PTR_RET.

This functions is really weird.  It sets rc to -ENOMEM, then overrides
it.  It was converted to PTR_RET in a1458187 when it should have
simply been rewritten.

This version makes it more explicit, with a single IS_ERR() test.

Cc: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_pad.c