Skip to content

spi: fix resource leaks on device setup failure

Johan Hovold linux-spi lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Changes in v2 from the cover letter

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

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2spi: fix resource leaks on device setup failuredrivers/spi/spi.c+37 -240 replies
2/2spi: fix controller cleanup() documentationinclude/linux/spi/spi.h+1 -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/2] spi: fix resource leaks on device setup failure

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