projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b73d45d
)
wmi: check find_guid() return value to prevent oops
author
Paul Rolland
<rol@as2917.net>
Wed, 30 Dec 2009 06:19:12 +0000
(
01:19
-0500)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Wed, 30 Dec 2009 20:42:53 +0000
(12:42 -0800)
Signed-off-by: rol@as2917.net <Paul Rolland>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/platform/x86/wmi.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/platform/x86/wmi.c
b/drivers/platform/x86/wmi.c
index 9f93d6c0f510d88a9e662caa917e92df4a4ed39f..cc9ad740bda15266303312fe68ab2586cc1bcfd3 100644
(file)
--- a/
drivers/platform/x86/wmi.c
+++ b/
drivers/platform/x86/wmi.c
@@
-492,8
+492,7
@@
wmi_notify_handler handler, void *data)
if (!guid || !handler)
return AE_BAD_PARAMETER;
- find_guid(guid, &block);
- if (!block)
+ if (!find_guid(guid, &block))
return AE_NOT_EXIST;
if (block->handler)
@@
-521,8
+520,7
@@
acpi_status wmi_remove_notify_handler(const char *guid)
if (!guid)
return AE_BAD_PARAMETER;
- find_guid(guid, &block);
- if (!block)
+ if (!find_guid(guid, &block))
return AE_NOT_EXIST;
if (!block->handler)