Skip to content

Commit

Permalink
drivers/spi/spi-tegra114.c clean use of devm_ioremap_resource()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Laurent Navet authored and Mark Brown committed Aug 20, 2013
1 parent 86562d0 commit 5f7f54b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/spi/spi-tegra114.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5f7f54b

Please sign in to comment.