From: Mika Westerberg Date: Mon, 13 May 2013 10:45:09 +0000 (+0300) Subject: spi/pxa2xx: fix compile warning in pxa2xx_spi_acpi_get_pdata() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6dc81f6fc0eaf0714bc6e959f8769705f41fd708;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git spi/pxa2xx: fix compile warning in pxa2xx_spi_acpi_get_pdata() Commit cbfd6a21b6f (spi/pxa2xx: Convert to devm_ioremap_resource()) converted the driver to use devm_ioremap_resource(). However it causes following warning to be emitted: drivers/spi/spi-pxa2xx.c: In function ‘pxa2xx_spi_acpi_get_pdata’: drivers/spi/spi-pxa2xx.c:1094:3: warning: return makes pointer from integer without a cast [enabled by default] Fix this by returning NULL as it was done previously (error printing is already done by devm_ioremap_resource()). Signed-off-by: Mika Westerberg Cc: Sachin Kamat Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index f5d84d6f8222..e5d782332ca5 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1091,7 +1091,7 @@ pxa2xx_spi_acpi_get_pdata(struct platform_device *pdev) ssp->phys_base = res->start; ssp->mmio_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(ssp->mmio_base)) - return PTR_ERR(ssp->mmio_base); + return NULL; ssp->clk = devm_clk_get(&pdev->dev, NULL); ssp->irq = platform_get_irq(pdev, 0);