Staging: quickstart: Cleanup quickstart_acpi_remove
authorSzymon Janc <szymon@janc.net.pl>
Wed, 11 Jan 2012 22:22:41 +0000 (23:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2012 01:16:48 +0000 (17:16 -0800)
Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/quickstart/quickstart.c

index 3bae5e7..de98e18 100644 (file)
@@ -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);