]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: axiado: Fix double-free in ax_spi_probe()
authorFelix Gu <ustc.gu@gmail.com>
Sun, 1 Mar 2026 17:08:40 +0000 (01:08 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 16 Mar 2026 00:28:54 +0000 (00:28 +0000)
commit7fc5e2f5603cfb305d0a8071f56b5bdb55161aeb
treea653816608ff9e978bcae09628c7efc7d3e1ba50
parentb8db9552997924b750e727a625a30eaa4603bbb9
spi: axiado: Fix double-free in ax_spi_probe()

ctlr is allocated using devm_spi_alloc_host(), which automatically
handles reference counting via the devm framework.

Calling spi_controller_put() manually in the probe error path is
redundant and results in a double-free.

Fixes: e75a6b00ad79 ("spi: axiado: Add driver for Axiado SPI DB controller")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260302-axiado-v1-1-1132819f1cb7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-axiado.c