projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4bd8c6
)
ACPI: sbs: check for NULL device pointer
author
Lebedev, Vladimir P
<vladimir.p.lebedev@intel.com>
Tue, 5 Sep 2006 15:49:13 +0000
(19:49 +0400)
committer
Len Brown
<len.brown@intel.com>
Sat, 14 Oct 2006 04:33:52 +0000
(
00:33
-0400)
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/sbs.c
patch
|
blob
|
history
diff --git
a/drivers/acpi/sbs.c
b/drivers/acpi/sbs.c
index 62bef0b3b614aef8d10742cd3494e9ecca149675..79f38f0367757e460610031bba64e9b62873689d 100644
(file)
--- 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;
}