mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
hwrng: bcm2835 - handle of_iomap failures
Check return value of of_iomap and handle errors correctly. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
10faa8c0d6
commit
da59c51cf2
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue