summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-bcm63xx-hsspi.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-12-06 17:12:13 +0300
committerMark Brown <broonie@linaro.org>2013-12-09 17:24:21 +0000
commit87917528cc922d0b91643dabacec01415c792086 (patch)
tree6700858f1aec1beee68192a4901ff091cd7e3f7e /drivers/spi/spi-bcm63xx-hsspi.c
parent142168eba9dc5c20538a67049ad53c49bc6f8336 (diff)
downloadop-kernel-dev-87917528cc922d0b91643dabacec01415c792086.zip
op-kernel-dev-87917528cc922d0b91643dabacec01415c792086.tar.gz
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 <dan.carpenter@oracle.com> Acked-by: Jonas Gorski <jogo@openwrt.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-bcm63xx-hsspi.c')
-rw-r--r--drivers/spi/spi-bcm63xx-hsspi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c
index bc8d848..2cfe8eb 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);
OpenPOWER on IntegriCloud