linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Convert manual kfree(dev) to put_device()
@ 2026-08-14 21:00 Tarun Sahu
  2026-08-14 21:00 ` [PATCH v3 1/3] ARM: locomo: use put_device() on device_register() failure Tarun Sahu
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Tarun Sahu @ 2026-08-14 21:00 UTC (permalink / raw)
  To: helgaas, dmatlack, Nicholas Piggin, Greg Kroah-Hartman,
	sourabhjain, Christophe Leroy (CS GROUP), Pasha Tatashin,
	Russell King, radheys, skhawaja, djeffery, Geoff Levand,
	Madhavan Srinivasan, Michael Ellerman
  Cc: linux-arm-kernel, souravsgl, linuxppc-dev, linux-kernel,
	driver-core, Tarun Sahu

Hello,

As per the kernel-doc guidelines, Devices that are tried to register
with device_register or to add using device_add, must use put_device
on their failure path (not kfree). This series contains 3 patches
for updating such instances. Same for kobject_init_and_add or
kobject_add, call kobject_put instead of kfree in case of error.

V3<-V1
1. Updated the commit msg of each patch to mention about the kernel-doc
   guidelines.

V2 <- V1
1. Removed patch [1] as it is part of another series [2] already.

[1]: https://lore.kernel.org/all/20260810162814.1398016-4-tarunsahu@google.com/
[2]: https://lore.kernel.org/all/20260724171945.2812749-5-shubhrajyoti.datta@amd.com/

Tarun Sahu (3):
  ARM: locomo: use put_device() on device_register() failure
  firmware/edd: use kobject_put() on edd_device_register() failure
  powerpc/ps3: use put_device() on device_register() failure in
    ps3_system_bus_device_register

 arch/arm/common/locomo.c                 | 13 ++--
 arch/powerpc/platforms/ps3/device-init.c | 83 ++++++++++++++----------
 arch/powerpc/platforms/ps3/system-bus.c  |  2 +
 drivers/firmware/edd.c                   |  2 +-
 4 files changed, 59 insertions(+), 41 deletions(-)


base-commit: ddca0cd800962b4121e5f2633005167bb6216175
-- 
2.55.0.691.gc56d675ccc-goog



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-08-14 22:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-14 21:00 [PATCH v3 0/3] Convert manual kfree(dev) to put_device() Tarun Sahu
2026-08-14 21:00 ` [PATCH v3 1/3] ARM: locomo: use put_device() on device_register() failure Tarun Sahu
2026-08-14 21:00 ` [PATCH v3 2/3] firmware/edd: use kobject_put() on edd_device_register() failure Tarun Sahu
2026-08-14 22:06   ` Bjorn Helgaas
2026-08-14 21:00 ` [PATCH v3 3/3] powerpc/ps3: use put_device() on device_register() failure in ps3_system_bus_device_register Tarun Sahu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).