base: soc: use put_device() instead of kfree()
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Sun, 11 Mar 2018 05:55:48 +0000 (11:25 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Mar 2018 13:37:03 +0000 (14:37 +0100)
commitef49ec1dc35112b17f7e928aa08fcab60240bf1d
treeb735a02ac7d941b7bb4b1403a500c6d0f89e5dc1
parent9de9a449482677a75f1edd2049268a7efc40fc96
base: soc: 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/soc.c