summaryrefslogtreecommitdiff
path: root/include/linux/spi
diff options
context:
space:
mode:
authorVaishnav Achath <vaishnav.a@ti.com>2022-06-01 12:46:11 +0530
committerMark Brown <broonie@kernel.org>2022-06-06 12:39:18 +0100
commit8523c96894e916b20ba3612e48e404fad5acfdd9 (patch)
tree0bedb7aeaf2e8e151f43c78b9c78511098d3e936 /include/linux/spi
parentf52b03c707444c5a3d1a0b9c5724f93ddc3c588e (diff)
downloadlwn-8523c96894e916b20ba3612e48e404fad5acfdd9.tar.gz
lwn-8523c96894e916b20ba3612e48e404fad5acfdd9.zip
spi: cadence-quadspi: Remove spi_master_put() in probe failure path
Currently the spi_master is allocated by devm_spi_alloc_master() and devres core manages the deallocation, but in probe failure path spi_master_put() is being handled manually which causes "refcount underflow use-after-free" warning when probe failure happens after allocating spi_master. Trimmed backtrace during failure: refcount_t: underflow; use-after-free. pc : refcount_warn_saturate+0xf4/0x144 Call trace: refcount_warn_saturate kobject_put put_device devm_spi_release_controller devres_release_all This commit makes relevant changes to remove spi_master_put() from probe failure path. Fixes: 606e5d408184 ("spi: cadence-quadspi: Handle spi_unregister_master() in remove()") Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Link: https://lore.kernel.org/r/20220601071611.11853-1-vaishnav.a@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/spi')
0 files changed, 0 insertions, 0 deletions