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