Skip to content

Commit

Permalink
Staging: quickstart: Cleanup quickstart_acpi_remove
Browse files Browse the repository at this point in the history
Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Szymon Janc authored and Greg Kroah-Hartman committed Feb 9, 2012
1 parent 2ac1696 commit 60955f1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/staging/quickstart/quickstart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 60955f1

Please sign in to comment.