public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] spi: fix resource leaks on device setup failure
@ 2026-04-10 15:49 Johan Hovold
  2026-04-10 15:49 ` [PATCH 1/2] " Johan Hovold
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Johan Hovold @ 2026-04-10 15:49 UTC (permalink / raw)
  To: Mark Brown; +Cc: Saravana Kannan, linux-spi, linux-kernel, Johan Hovold

Make sure to call controller cleanup() if spi_setup() fails while
registering a device to avoid leaking any resources allocated by
setup().

Johan


Changes in v2:
 - only call cleanup() if spi_setup() fails during registration
 - use spi_cleanup() helper
 - fix controller cleanup() documentation (new patch)


Johan Hovold (2):
  spi: fix resource leaks on device setup failure
  spi: fix controller cleanup() documentation

 drivers/spi/spi.c       | 61 +++++++++++++++++++++++++----------------
 include/linux/spi/spi.h |  2 +-
 2 files changed, 38 insertions(+), 25 deletions(-)

-- 
2.52.0


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

end of thread, other threads:[~2026-04-10 15:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-10 15:49 [PATCH 0/2] spi: fix resource leaks on device setup failure Johan Hovold
2026-04-10 15:49 ` [PATCH 1/2] " Johan Hovold
2026-04-10 15:49 ` [PATCH 2/2] spi: fix controller cleanup() documentation Johan Hovold
2026-04-10 15:51 ` [PATCH 0/2] spi: fix resource leaks on device setup failure Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox