提交 da59c51c 编写于 作者: A Arvind Yadav 提交者: Herbert Xu

hwrng: bcm2835 - handle of_iomap failures

Check return value of of_iomap and handle errors correctly.
Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: NEric Anholt <eric@anholt.net>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 10faa8c0
......@@ -92,9 +92,10 @@ static int bcm2835_rng_probe(struct platform_device *pdev)
bcm2835_rng_ops.priv = (unsigned long)rng_base;
rng_id = of_match_node(bcm2835_rng_of_match, np);
if (!rng_id)
if (!rng_id) {
iounmap(rng_base);
return -EINVAL;
}
/* Check for rng init function, execute it */
rng_setup = rng_id->data;
if (rng_setup)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册