diff --git a/drivers/staging/quickstart/quickstart.c b/drivers/staging/quickstart/quickstart.c index 3bae5e7565983072670097398680d32c9a8b83ab..de98e18f9b4cc8e4bec9148e171c016b26389ea5 100644 --- a/drivers/staging/quickstart/quickstart.c +++ b/drivers/staging/quickstart/quickstart.c @@ -309,13 +309,15 @@ static int quickstart_acpi_add(struct acpi_device *device) 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);