]> git.dujemihanovic.xyz Git - linux.git/commit
spi: spi-fsl-lpspi: remove redundant spi_controller_put call
authorCarlos Song <carlos.song@nxp.com>
Wed, 3 Apr 2024 08:40:29 +0000 (16:40 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 3 Apr 2024 10:04:57 +0000 (11:04 +0100)
commitbff892acf79cec531da6cb21c50980a584ce1476
treeced6451d87055d983d09eb31599cbb9650914969
parenta3d3eab627bbbb0cb175910cf8d0f7022628a642
spi: spi-fsl-lpspi: remove redundant spi_controller_put call

devm_spi_alloc_controller will allocate an SPI controller and
automatically release a reference on it when dev is unbound from
its driver. It doesn't need to call spi_controller_put explicitly
to put the reference when lpspi driver failed initialization.

Fixes: 2ae0ab0143fc ("spi: lpspi: Avoid potential use-after-free in probe()")
Signed-off-by: Carlos Song <carlos.song@nxp.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Link: https://msgid.link/r/20240403084029.2000544-1-carlos.song@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-lpspi.c