diff options
author | Szymon Janc <szymon@janc.net.pl> | 2012-01-11 23:22:41 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-08 17:16:48 -0800 |
commit | 60955f15d93198ef33081e01f46223c7bd534f1e (patch) | |
tree | 70f9d5fd2fe407f5bb15d1fd5f5a1a618ff6a004 /drivers/staging/quickstart | |
parent | 2ac16967b8de55ec1cfb596717b3a68b0d5b42f7 (diff) |
Staging: quickstart: Cleanup quickstart_acpi_remove
Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/quickstart')
-rw-r--r-- | drivers/staging/quickstart/quickstart.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/staging/quickstart/quickstart.c b/drivers/staging/quickstart/quickstart.c index 3bae5e756598..de98e18f9b4c 100644 --- a/drivers/staging/quickstart/quickstart.c +++ b/drivers/staging/quickstart/quickstart.c @@ -309,13 +309,15 @@ fail_config: static int quickstart_acpi_remove(struct acpi_device *device, int type) { - acpi_status status = 0; - struct quickstart_acpi *quickstart = NULL; + acpi_status status; + struct quickstart_acpi *quickstart; - if (!device || !acpi_driver_data(device)) + if (!device) return -EINVAL; quickstart = acpi_driver_data(device); + if (!quickstart) + return -EINVAL; status = acpi_remove_notify_handler(device->handle, ACPI_ALL_NOTIFY, quickstart_acpi_notify); |