sparc: vio: use put_device() instead of kfree()
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 25 Apr 2018 14:56:14 +0000 (20:26 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Apr 2018 20:09:34 +0000 (16:09 -0400)
commit00ad691ab140b54ab9f5de5e74cb994f552e8124
tree576e21cceb8802d26a4d3a4e2a116d0440112c6c
parentd3c68d0b4183ddfa05577348a231dd117e6563df
sparc: vio: 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: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/vio.c