提交 ac1ed0c0 编写于 作者: F Fabio Estevam 提交者: Herbert Xu

crypto: dcp - Check the return value from devm_ioremap_resource()

devm_ioremap_resource() may fail, so better check its return value and propagate
it in the case of error.
Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 48e6dc1b
...@@ -734,6 +734,8 @@ static int dcp_probe(struct platform_device *pdev) ...@@ -734,6 +734,8 @@ static int dcp_probe(struct platform_device *pdev)
r = platform_get_resource(pdev, IORESOURCE_MEM, 0); r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
dev->dcp_regs_base = devm_ioremap_resource(&pdev->dev, r); dev->dcp_regs_base = devm_ioremap_resource(&pdev->dev, r);
if (IS_ERR(dev->dcp_regs_base))
return PTR_ERR(dev->dcp_regs_base);
dcp_set(dev, DCP_CTRL_SFRST, DCP_REG_CTRL); dcp_set(dev, DCP_CTRL_SFRST, DCP_REG_CTRL);
udelay(10); udelay(10);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册