]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitbbd8808caf0b714a8134477694b2eb8f72c0f8e7
treeb735a02ac7d941b7bb4b1403a500c6d0f89e5dc1
parent8ff063dfb7d76bfdb07f0c5f5e59237157c20dfa
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