sparc: vio: use put_device() instead of kfree()

[ Upstream commit 00ad691ab1 ]

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: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Arvind Yadav 2018-04-25 20:26:14 +05:30 • committed by Greg Kroah-Hartman
commit ea5ffcd467