From 87917528cc922d0b91643dabacec01415c792086 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 6 Dec 2013 17:12:13 +0300 Subject: [PATCH] spi: bcm63xx-hsspi: checking for ERR_PTR instead of NULL devm_request_and_ioremap() returns NULL on error, it doesn't return an ERR_PTR(). This patch fixes it by switching to devm_ioremap_resource() which is the prefered function anyway. Fixes: 142168eba9dc ('spi: bcm63xx-hsspi: add bcm63xx HSSPI driver') Signed-off-by: Dan Carpenter Acked-by: Jonas Gorski Signed-off-by: Mark Brown --- drivers/spi/spi-bcm63xx-hsspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c index bc8d848d33b7..2cfe8eb619fd 100644 --- a/drivers/spi/spi-bcm63xx-hsspi.c +++ b/drivers/spi/spi-bcm63xx-hsspi.c @@ -338,7 +338,7 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev) } res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_request_and_ioremap(dev, res_mem); + regs = devm_ioremap_resource(dev, res_mem); if (IS_ERR(regs)) return PTR_ERR(regs); -- 2.39.5