projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c201e38
)
HID: intel-ish-hid: fixes incorrect error handling
author
Pan Bian
<bianpan2016@163.com>
Thu, 22 Nov 2018 00:52:33 +0000
(08:52 +0800)
committer
Jiri Kosina
<jkosina@suse.cz>
Mon, 17 Dec 2018 14:04:49 +0000
(15:04 +0100)
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>
drivers/hid/intel-ish-hid/ishtp-hid.c
patch
|
blob
|
history
diff --git
a/drivers/hid/intel-ish-hid/ishtp-hid.c
b/drivers/hid/intel-ish-hid/ishtp-hid.c
index cd23903ddcf194e581902102ebcd56f70459ac9a..e918d78e541c0d072ea4fe89cdfec2eb9628da4c 100644
(file)
--- a/
drivers/hid/intel-ish-hid/ishtp-hid.c
+++ b/
drivers/hid/intel-ish-hid/ishtp-hid.c
@@
-222,7
+222,7
@@
int ishtp_hid_probe(unsigned int cur_hid_dev,
err_hid_device:
kfree(hid_data);
err_hid_data:
-
kfre
e(hid);
+
hid_destroy_devic
e(hid);
return rv;
}