Skip to content

Commit 6e0856d

Browse files
SinkFinderJiri Kosina
authored andcommitted
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: 0b28cb4("HID: intel-ish-hid: ISH HID client driver") Signed-off-by: Pan Bian <bianpan2016@163.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1 parent c201e38 commit 6e0856d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/intel-ish-hid/ishtp-hid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ int ishtp_hid_probe(unsigned int cur_hid_dev,
222222
err_hid_device:
223223
kfree(hid_data);
224224
err_hid_data:
225-
kfree(hid);
225+
hid_destroy_device(hid);
226226
return rv;
227227
}
228228

0 commit comments

Comments
 (0)