Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da59c51c authored by Arvind Yadav's avatar Arvind Yadav Committed by Herbert Xu
Browse files

hwrng: bcm2835 - handle of_iomap failures



Check return value of of_iomap and handle errors correctly.

Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: default avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 10faa8c0
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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)