diff options
author | Lebedev, Vladimir P <vladimir.p.lebedev@intel.com> | 2006-09-05 19:49:13 +0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-10-14 00:33:52 -0400 |
commit | 963497c12acb4d43caa9751b9291b014eea51a1a (patch) | |
tree | 0f03381df050a060f884d6f9a0a8b7fce9e9557d | |
parent | b4bd8c66435a8cdf8c90334fb3b517a23ff2ab95 (diff) | |
download | op-kernel-dev-963497c12acb4d43caa9751b9291b014eea51a1a.zip op-kernel-dev-963497c12acb4d43caa9751b9291b014eea51a1a.tar.gz |
ACPI: sbs: check for NULL device pointer
Signed-off-by: Len Brown <len.brown@intel.com>
-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 62bef0b..79f38f0 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c @@ -1685,10 +1685,16 @@ static int acpi_sbs_add(struct acpi_device *device) int acpi_sbs_remove(struct acpi_device *device, int type) { - struct acpi_sbs *sbs = (struct acpi_sbs *)acpi_driver_data(device); + struct acpi_sbs *sbs = NULL; int id; - if (!device || !sbs) { + if (!device) { + return -EINVAL; + } + + sbs = (struct acpi_sbs *)acpi_driver_data(device); + + if (!sbs) { return -EINVAL; } |