diff options
author | Pan Bian <bianpan2016@163.com> | 2018-11-22 08:52:33 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-05 09:20:24 +0100 |
commit | e1bb74ba4525adaaabd041a6e6dc9a05f53b2170 (patch) | |
tree | afa484ef4f3f0ec44f052f14084e2afe8b2fe21e | |
parent | 3e30e75bc15663d6e5fd56290c5bd296b1086e0f (diff) | |
download | linux-stable-e1bb74ba4525adaaabd041a6e6dc9a05f53b2170.tar.gz linux-stable-e1bb74ba4525adaaabd041a6e6dc9a05f53b2170.tar.bz2 linux-stable-e1bb74ba4525adaaabd041a6e6dc9a05f53b2170.zip |
HID: intel-ish-hid: fixes incorrect error handling
[ Upstream commit 6e0856d317440a950b17c00a9283114f025e5699 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/hid/intel-ish-hid/ishtp-hid.c | 2 |
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; } |