xen: xenbus: use put_device() instead of kfree()
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 6 Mar 2018 10:10:37 +0000 (15:40 +0530)
committerJuergen Gross <jgross@suse.com>
Thu, 8 Mar 2018 14:30:30 +0000 (15:30 +0100)
commit351b2bccede1cb673ec7957b35ea997ea24c8884
treead522233fb56749113f957127cdd6aecb70d6ef4
parentd811bcee1f7a379cad893fdee4c8db5775963b7f
xen: xenbus: 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>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/xenbus/xenbus_probe.c