mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
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: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
This commit is contained in:
parent
9cd5cf3710
commit
91c73e8092
@ -639,6 +639,8 @@ static int dell_wmi_events_set_enabled(bool enable)
|
||||
int ret;
|
||||
|
||||
buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL);
|
||||
if (!buffer)
|
||||
return -ENOMEM;
|
||||
buffer->cmd_class = CLASS_INFO;
|
||||
buffer->cmd_select = SELECT_APP_REGISTRATION;
|
||||
buffer->input[0] = 0x10000;
|
||||
|
Loading…
Reference in New Issue
Block a user