Skip to content

driver core: use put_device() instead of kfree()

Arvind Yadav lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4base: soc: use put_device() instead of kfree()drivers/base/soc.c+2 -00 replies
2/4driver core: platform: use put_device() if device_register faildrivers/base/platform.c+3 -10 replies
3/4driver core: node: use put_device() if device_register faildrivers/base/node.c+3 -10 replies
4/4driver core: cpu: use put_device() if device_register faildrivers/base/cpu.c+3 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] driver core: 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.

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(-)
Signature · 1 line
2.7.4