OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.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
62bef0b
..
79f38f0
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;
}