diff options
-rw-r--r-- | drivers/acpi/sbs.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 62bef0b3b614..79f38f036775 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
@@ -1685,10 +1685,16 @@ static int acpi_sbs_add(struct acpi_device *device) | |||
1685 | 1685 | ||
1686 | int acpi_sbs_remove(struct acpi_device *device, int type) | 1686 | int acpi_sbs_remove(struct acpi_device *device, int type) |
1687 | { | 1687 | { |
1688 | struct acpi_sbs *sbs = (struct acpi_sbs *)acpi_driver_data(device); | 1688 | struct acpi_sbs *sbs = NULL; |
1689 | int id; | 1689 | int id; |
1690 | 1690 | ||
1691 | if (!device || !sbs) { | 1691 | if (!device) { |
1692 | return -EINVAL; | ||
1693 | } | ||
1694 | |||
1695 | sbs = (struct acpi_sbs *)acpi_driver_data(device); | ||
1696 | |||
1697 | if (!sbs) { | ||
1692 | return -EINVAL; | 1698 | return -EINVAL; |
1693 | } | 1699 | } |
1694 | 1700 | ||