1
0
Fork 0

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

devm_ioremap_resource() returns ERR_PTR on failure.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
hifive-unleashed-5.1
Axel Lin 2015-04-30 10:06:54 +08:00 committed by Mark Brown
parent 4a1ae8be45
commit b2b3024ca5
1 changed files with 1 additions and 1 deletions

View File

@ -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));