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

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
......@@ -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;
}
......
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