Commit 532298b9 authored by Dan Carpenter's avatar Dan Carpenter Committed by Darren Hart (VMware)

platform/x86: dell-wmi: check for kmalloc() errors

This allocation won't fail in the current kernel because it's small but
not checking for kmalloc() failures introduces static checker warnings
so let's fix it.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarMario Limonciello <mario.limonciello@dell.com>
Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
parent bff5bf9d
...@@ -639,6 +639,8 @@ static int dell_wmi_events_set_enabled(bool enable) ...@@ -639,6 +639,8 @@ static int dell_wmi_events_set_enabled(bool enable)
int ret; int ret;
buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL); buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL);
if (!buffer)
return -ENOMEM;
buffer->cmd_class = CLASS_INFO; buffer->cmd_class = CLASS_INFO;
buffer->cmd_select = SELECT_APP_REGISTRATION; buffer->cmd_select = SELECT_APP_REGISTRATION;
buffer->input[0] = 0x10000; buffer->input[0] = 0x10000;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment