summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-04-22 15:10:22 +0100
committerMark Brown <broonie@kernel.org>2026-04-22 15:10:22 +0100
commit16ab65df5d867961a79cef366cdb33f09ebda603 (patch)
tree74e80a279997b9554243678a368146e21a875f99 /include/linux
parentad50f7bc5afefa3c2e013ae98511ead815b8f392 (diff)
parenta6e23843e949081b417b6078f02074074a190499 (diff)
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().
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/spi/spi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 82682dd9961da..79513f5941cca 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -701,7 +701,7 @@ struct spi_controller {
int (*transfer)(struct spi_device *spi,
struct spi_message *mesg);
- /* Called on release() to free memory provided by spi_controller */
+ /* Called on deregistration to free memory provided by spi_controller */
void (*cleanup)(struct spi_device *spi);
/*