Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f7f54b5 authored by Laurent Navet's avatar Laurent Navet Committed by Mark Brown
Browse files

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: default avatarLaurent Navet <laurent.navet@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 86562d04
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -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;