aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLebedev, Vladimir P <vladimir.p.lebedev@intel.com>2006-09-05 11:49:13 -0400
committerLen Brown <len.brown@intel.com>2006-10-14 00:33:52 -0400
commit963497c12acb4d43caa9751b9291b014eea51a1a (patch)
tree0f03381df050a060f884d6f9a0a8b7fce9e9557d /drivers
parentb4bd8c66435a8cdf8c90334fb3b517a23ff2ab95 (diff)
ACPI: sbs: check for NULL device pointer
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/sbs.c10
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
1686int acpi_sbs_remove(struct acpi_device *device, int type) 1686int 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