[PATCH 0/4] driver core: use put_device() instead of kfree()

From: Arvind Yadav
Date: Sun Mar 11 2018 - 00:56:28 EST


Never directly free @dev after calling device_register(), even
if it returned an error! Always use put_device() to give up the
reference initialized.

Arvind Yadav (4):
[PATCH 1/4] base: soc: use put_device() instead of kfree()
[PATCH 2/4] driver core: platform: use put_device() if device_register fail
[PATCH 3/4] driver core: node: use put_device() if device_register fail
[PATCH 4/4] driver core: cpu: use put_device() if device_register fail

drivers/base/cpu.c | 4 +++-
drivers/base/node.c | 4 +++-
drivers/base/platform.c | 4 +++-
drivers/base/soc.c | 2 ++
4 files changed, 11 insertions(+), 3 deletions(-)

--
2.7.4