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

Commit 6e0856d3 authored by Pan Bian's avatar Pan Bian Committed by Jiri Kosina
Browse files

HID: intel-ish-hid: fixes incorrect error handling



The memory chunk allocated by hid_allocate_device() should be released
by hid_destroy_device(), not kfree().

Fixes: 0b28cb4b("HID: intel-ish-hid: ISH HID client driver")
Signed-off-by: default avatarPan Bian <bianpan2016@163.com>
Reviewed-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent c201e380
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@ int ishtp_hid_probe(unsigned int cur_hid_dev,
err_hid_device:
	kfree(hid_data);
err_hid_data:
	kfree(hid);
	hid_destroy_device(hid);
	return rv;
}