workqueue: use put_device() instead of kfree()
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 6 Mar 2018 10:05:43 +0000 (15:35 +0530)
committerTejun Heo <tj@kernel.org>
Tue, 13 Mar 2018 20:26:03 +0000 (13:26 -0700)
commit537f4146c53c95aac977852b371bafb9c6755ee1
treeb9efb4fd1da5c35febeef6dd3f9e21ac824d810e
parentfc6eabbbf8ef99efed778dd5afabc83c21dba585
workqueue: 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 in this function instead.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c