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: 0b28cb4bcb1("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>
This commit is contained in:
Родитель
c201e3808e
Коммит
6e0856d317
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче