diff options
author | Ian Molton <ian.molton@codethink.co.uk> | 2015-04-27 02:01:17 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-06-01 10:06:47 +0300 |
commit | 7df56bbb0e86f81faaf2ee5bf126c2fb5a0e3980 (patch) | |
tree | 8bedb57f8e0ddaba0c69460579cbb3f1afc8a9c7 /drivers | |
parent | 25db67e2ce2fdf43a99d89d201c356267ab06bf7 (diff) | |
download | linux-7df56bbb0e86f81faaf2ee5bf126c2fb5a0e3980.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/host/tmio_mmc_pio.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index dba7e1c19dd7..e3dcf31a8bd6 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -1108,7 +1108,8 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, if (ret < 0) goto host_free; - _host->ctl = ioremap(res_ctl->start, resource_size(res_ctl)); + _host->ctl = devm_ioremap(&pdev->dev, + res_ctl->start, resource_size(res_ctl)); if (!_host->ctl) { ret = -ENOMEM; goto host_free; @@ -1230,8 +1231,6 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host) pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); - - iounmap(host->ctl); } EXPORT_SYMBOL(tmio_mmc_host_remove); |