projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48e6dc1
)
crypto: dcp - Check the return value from devm_ioremap_resource()
author
Fabio Estevam
<fabio.estevam@freescale.com>
Mon, 23 Sep 2013 21:12:04 +0000
(18:12 -0300)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Mon, 7 Oct 2013 06:16:54 +0000
(14:16 +0800)
devm_ioremap_resource() may fail, so better check its return value and propagate
it in the case of error.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/dcp.c
patch
|
blob
|
history
diff --git
a/drivers/crypto/dcp.c
b/drivers/crypto/dcp.c
index
7b77c84
..
247ab80
100644
(file)
--- a/
drivers/crypto/dcp.c
+++ b/
drivers/crypto/dcp.c
@@
-734,6
+734,8
@@
static int dcp_probe(struct platform_device *pdev)
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
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);
udelay(10);