diff options
| author | Felix Gu <ustc.gu@gmail.com> | 2026-03-09 21:01:34 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-03-09 22:10:21 +0300 |
| commit | 111e2863372c322e836e0c896f6dd9cf4ee08c71 (patch) | |
| tree | ccaf251bc715844143f73cd558a9b4f523821246 /include/linux/root_dev.h | |
| parent | ad0e9ac2d5f5ab7a773c2c07ecf06ee59db9259f (diff) | |
| download | linux-111e2863372c322e836e0c896f6dd9cf4ee08c71.tar.xz | |
spi: rockchip-sfc: Fix double-free in remove() callback
The driver uses devm_spi_register_controller() for registration, which
automatically unregisters the controller via devm cleanup when the
device is removed. The manual call to spi_unregister_controller() in
the remove() callback can lead to a double-free.
And to make sure controller is unregistered before DMA buffer is
unmapped, switch to use spi_register_controller() in probe().
Fixes: 8011709906d0 ("spi: rockchip-sfc: Support pm ops")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260310-sfc-v2-1-67fab04b097f@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/root_dev.h')
0 files changed, 0 insertions, 0 deletions
