summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-11-19 11:16:57 -0200
committerUlf Hansson <ulf.hansson@linaro.org>2014-11-26 14:31:03 +0100
commitc3cd5c076c3ab6a088d73e260b516bcda1dc9da4 (patch)
treeb04999ad95324cd5c065d76cf1d3ac8bf410fb12 /drivers/mmc
parent4d7c07cd6c0379228e65c52776f22250e8f4a962 (diff)
downloadop-kernel-dev-c3cd5c076c3ab6a088d73e260b516bcda1dc9da4.zip
op-kernel-dev-c3cd5c076c3ab6a088d73e260b516bcda1dc9da4.tar.gz
mmc: mxs-mmc: No need to do NULL check on 'iores'
devm_ioremap_resource() already checks if 'iores' is NULL or not, so we can skip this manual check. While at it, move platform_get_resource() closer to devm_ioremap_resource() for better readability. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mxs-mmc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index c049ac7..0d30730 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -581,9 +581,8 @@ static int mxs_mmc_probe(struct platform_device *pdev)
struct regulator *reg_vmmc;
struct mxs_ssp *ssp;
- iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
irq_err = platform_get_irq(pdev, 0);
- if (!iores || irq_err < 0)
+ if (irq_err < 0)
return -EINVAL;
mmc = mmc_alloc_host(sizeof(struct mxs_mmc_host), &pdev->dev);
@@ -593,6 +592,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
host = mmc_priv(mmc);
ssp = &host->ssp;
ssp->dev = &pdev->dev;
+ iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
ssp->base = devm_ioremap_resource(&pdev->dev, iores);
if (IS_ERR(ssp->base)) {
ret = PTR_ERR(ssp->base);
OpenPOWER on IntegriCloud