Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: aspeed: Use devm_iounmap() to unmap devm_ioremap() memory

The AHB IO memory for each chip select is mapped using
devm_ioremap(), so it should be unmapped using devm_iounmap()
to ensure proper device-managed resource cleanup.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202510292356.JnTUBxCl-lkp@intel.com/
Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://patch.msgid.link/20251105084952.1063489-1-chin-ting_kuo@aspeedtech.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Chin-Ting Kuo and committed by
Mark Brown
2f538ef9 8b6faa7f

+1 -1
+1 -1
drivers/spi/spi-aspeed-smc.c
··· 396 396 397 397 for (cs = 0; cs < aspi->data->max_cs; cs++) { 398 398 if (aspi->chips[cs].ahb_base) { 399 - iounmap(aspi->chips[cs].ahb_base); 399 + devm_iounmap(dev, aspi->chips[cs].ahb_base); 400 400 aspi->chips[cs].ahb_base = NULL; 401 401 } 402 402 }