Commit ad7014b3 authored by Wolfram Sang's avatar Wolfram Sang Committed by Ulf Hansson

mmc: host: tmio: drop superfluous exit path

The probe exit path on error does nothing since commit 94b110af
("mmc: tmio: add tmio_mmc_host_alloc/free()"), so we can bail out
immediately.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarSimon Horman <horms+renesas@verge.net.au>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent c1ada71f
...@@ -1143,7 +1143,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, ...@@ -1143,7 +1143,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
ret = mmc_of_parse(mmc); ret = mmc_of_parse(mmc);
if (ret < 0) if (ret < 0)
goto host_free; return ret;
_host->pdata = pdata; _host->pdata = pdata;
platform_set_drvdata(pdev, mmc); platform_set_drvdata(pdev, mmc);
...@@ -1153,14 +1153,12 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, ...@@ -1153,14 +1153,12 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
ret = tmio_mmc_init_ocr(_host); ret = tmio_mmc_init_ocr(_host);
if (ret < 0) if (ret < 0)
goto host_free; return ret;
_host->ctl = devm_ioremap(&pdev->dev, _host->ctl = devm_ioremap(&pdev->dev,
res_ctl->start, resource_size(res_ctl)); res_ctl->start, resource_size(res_ctl));
if (!_host->ctl) { if (!_host->ctl)
ret = -ENOMEM; return -ENOMEM;
goto host_free;
}
tmio_mmc_ops.card_busy = _host->card_busy; tmio_mmc_ops.card_busy = _host->card_busy;
tmio_mmc_ops.start_signal_voltage_switch = _host->start_signal_voltage_switch; tmio_mmc_ops.start_signal_voltage_switch = _host->start_signal_voltage_switch;
...@@ -1198,10 +1196,8 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, ...@@ -1198,10 +1196,8 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
* Check the sanity of mmc->f_min to prevent tmio_mmc_set_clock() from * Check the sanity of mmc->f_min to prevent tmio_mmc_set_clock() from
* looping forever... * looping forever...
*/ */
if (mmc->f_min == 0) { if (mmc->f_min == 0)
ret = -EINVAL; return -EINVAL;
goto host_free;
}
/* /*
* While using internal tmio hardware logic for card detection, we need * While using internal tmio hardware logic for card detection, we need
...@@ -1266,10 +1262,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, ...@@ -1266,10 +1262,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
} }
return 0; return 0;
host_free:
return ret;
} }
EXPORT_SYMBOL(tmio_mmc_host_probe); EXPORT_SYMBOL(tmio_mmc_host_probe);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment