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)
committerJiri Kosina <jkosina@suse.cz>
Thu, 26 Apr 2018 12:36:43 +0000 (14:36 +0200)
commita4eb490a41a0da3b1275fc7427084cf9ae2c3c1c
treec4ecd66202bada3b4e55750239de610464eecb9c
parent749ab300d41bcdbb8edf776d20e9a9891e79eba4
HID: intel-ish-hid: use put_device() instead of kfree()

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>
drivers/hid/intel-ish-hid/ishtp/bus.c