[PATCH 0/2] spi: fix resource leaks on device setup failure
From: Johan Hovold
Date: Fri Apr 10 2026 - 12:13:31 EST
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