aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPan Bian <[email protected]>2018-11-22 08:52:33 +0800
committerJiri Kosina <[email protected]>2018-12-17 15:04:49 +0100
commit6e0856d317440a950b17c00a9283114f025e5699 (patch)
tree61f238dab07ec0d8f788a9548a4eb85c396bf7b7
parentc201e3808e0e4be9b98d192802085a9f491bd80c (diff)
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 <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
-rw-r--r--drivers/hid/intel-ish-hid/ishtp-hid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.c b/drivers/hid/intel-ish-hid/ishtp-hid.c
index cd23903ddcf1..e918d78e541c 100644
--- 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:
- kfree(hid);
+ hid_destroy_device(hid);
return rv;
}