提交 b58454ec 编写于 作者: P Paul Rolland 提交者: Linus Torvalds

wmi: check find_guid() return value to prevent oops

Signed-off-by: rol@as2917.net <Paul Rolland>
Signed-off-by: NLen Brown <len.brown@intel.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 b73d45da
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册