mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
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>
This commit is contained in:
parent
8b6faa7fdd
commit
2f538ef9f6
|
|
@ -396,7 +396,7 @@ static int aspeed_spi_set_window(struct aspeed_spi *aspi)
|
|||
|
||||
for (cs = 0; cs < aspi->data->max_cs; cs++) {
|
||||
if (aspi->chips[cs].ahb_base) {
|
||||
iounmap(aspi->chips[cs].ahb_base);
|
||||
devm_iounmap(dev, aspi->chips[cs].ahb_base);
|
||||
aspi->chips[cs].ahb_base = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user