]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: fix resource leaks on device setup failure
authorMark Brown <broonie@kernel.org>
Wed, 22 Apr 2026 14:10:22 +0000 (15:10 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 22 Apr 2026 14:10:22 +0000 (15:10 +0100)
commit16ab65df5d867961a79cef366cdb33f09ebda603
tree74e80a279997b9554243678a368146e21a875f99
parentad50f7bc5afefa3c2e013ae98511ead815b8f392
parenta6e23843e949081b417b6078f02074074a190499
spi: fix resource leaks on device setup failure

Johan Hovold <johan@kernel.org> says:

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