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

Commit b2b3024c authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

spi: rb4xx: Fix checking return value of devm_ioremap_resource()



devm_ioremap_resource() returns ERR_PTR on failure.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4a1ae8be
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ static int rb4xx_spi_probe(struct platform_device *pdev)

	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	spi_base = devm_ioremap_resource(&pdev->dev, r);
	if (!spi_base)
	if (IS_ERR(spi_base))
		return PTR_ERR(spi_base);

	master = spi_alloc_master(&pdev->dev, sizeof(*rbspi));