HID: intel-ish-hid: use put_device() instead of kfree()
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Fri, 30 Mar 2018 11:26:10 +0000 (16:56 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2018 19:02:48 +0000 (04:02 +0900)
commit11ac08bd73ebfda3bb0c7b748d0306bdb658e6fe
treeafd57169386c08bee24afb18b4b9a3cf97e24f4f
parentd803d94a3fcde7f317c40cc846d7c585532119f0
HID: intel-ish-hid: use put_device() instead of kfree()

[ Upstream commit a4eb490a41a0da3b1275fc7427084cf9ae2c3c1c ]

Never directly free @dev after calling device_register(), even
if it returned an error. Always use put_device() to give up the
reference initialized.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/intel-ish-hid/ishtp/bus.c