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

mmc: TMIO: Fix I/O mapping leak on error using devm_ioremap()

Signed-off-by: Ian Molton <ian.molton@codethink.co.uk>
[bwh: Forward-ported to 4.0]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Ian Molton and committed by
Ulf Hansson
7df56bbb 25db67e2

+2 -3
+2 -3
drivers/mmc/host/tmio_mmc_pio.c
··· 1108 1108 if (ret < 0) 1109 1109 goto host_free; 1110 1110 1111 - _host->ctl = ioremap(res_ctl->start, resource_size(res_ctl)); 1111 + _host->ctl = devm_ioremap(&pdev->dev, 1112 + res_ctl->start, resource_size(res_ctl)); 1112 1113 if (!_host->ctl) { 1113 1114 ret = -ENOMEM; 1114 1115 goto host_free; ··· 1231 1230 1232 1231 pm_runtime_put_sync(&pdev->dev); 1233 1232 pm_runtime_disable(&pdev->dev); 1234 - 1235 - iounmap(host->ctl); 1236 1233 } 1237 1234 EXPORT_SYMBOL(tmio_mmc_host_remove); 1238 1235