diff options
author | Laurent Navet <laurent.navet@gmail.com> | 2013-05-14 12:07:12 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-20 11:43:59 +0100 |
commit | 5f7f54b5cafcba7c20f8888c1d7acfa21bfca20b (patch) | |
tree | d074f0b028d551a2934f3113f67644df7847113a /drivers/spi | |
parent | 86562d04fc8212e2453d9714064a741a7d400da0 (diff) | |
download | linux-5f7f54b5cafcba7c20f8888c1d7acfa21bfca20b.tar.gz linux-5f7f54b5cafcba7c20f8888c1d7acfa21bfca20b.tar.bz2 linux-5f7f54b5cafcba7c20f8888c1d7acfa21bfca20b.zip |
drivers/spi/spi-tegra114.c clean use of devm_ioremap_resource()
Check of 'r' and calls to dev_err are already done in devm_ioremap_resource,
so no need to do them twice.
Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-tegra114.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index 8c99c00515c4..bb435ca994a5 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c @@ -1059,17 +1059,12 @@ static int tegra_spi_probe(struct platform_device *pdev) spin_lock_init(&tspi->lock); r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!r) { - dev_err(&pdev->dev, "No IO memory resource\n"); - ret = -ENODEV; - goto exit_free_master; - } - tspi->phys = r->start; tspi->base = devm_ioremap_resource(&pdev->dev, r); if (IS_ERR(tspi->base)) { ret = PTR_ERR(tspi->base); goto exit_free_master; } + tspi->phys = r->start; spi_irq = platform_get_irq(pdev, 0); tspi->irq = spi_irq; |