Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;