linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] char: hw_random: bcm2835: handle of_iomap failures in bcm2835 driver
@ 2016-08-29 17:10 Arvind Yadav
  2016-08-30 18:26 ` Eric Anholt
  2016-09-07 13:19 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Arvind Yadav @ 2016-08-29 17:10 UTC (permalink / raw)
  To: f.fainelli, rjui, sbranden, bcm-kernel-feedback-list, lee, eric,
	yendapally.reddy
  Cc: linux-crypto, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	mpm, herbert, Arvind Yadav

Check return value of of_iomap and handle errors correctly.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/char/hw_random/bcm2835-rng.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c
index af21492..574211a 100644
--- a/drivers/char/hw_random/bcm2835-rng.c
+++ b/drivers/char/hw_random/bcm2835-rng.c
@@ -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)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] char: hw_random: bcm2835: handle of_iomap failures in bcm2835 driver
  2016-08-29 17:10 [PATCH] char: hw_random: bcm2835: handle of_iomap failures in bcm2835 driver Arvind Yadav
@ 2016-08-30 18:26 ` Eric Anholt
  2016-09-07 13:19 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Anholt @ 2016-08-30 18:26 UTC (permalink / raw)
  To: Arvind Yadav, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, lee, yendapally.reddy
  Cc: linux-crypto, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	mpm, herbert, Arvind Yadav

[-- Attachment #1: Type: text/plain, Size: 213 bytes --]

Arvind Yadav <arvind.yadav.cs@gmail.com> writes:

> 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>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] char: hw_random: bcm2835: handle of_iomap failures in bcm2835 driver
  2016-08-29 17:10 [PATCH] char: hw_random: bcm2835: handle of_iomap failures in bcm2835 driver Arvind Yadav
  2016-08-30 18:26 ` Eric Anholt
@ 2016-09-07 13:19 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2016-09-07 13:19 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: f.fainelli, rjui, sbranden, bcm-kernel-feedback-list, lee, eric,
	yendapally.reddy, linux-crypto, linux-rpi-kernel,
	linux-arm-kernel, linux-kernel, mpm

On Mon, Aug 29, 2016 at 10:40:16PM +0530, Arvind Yadav wrote:
> Check return value of of_iomap and handle errors correctly.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-07 13:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-29 17:10 [PATCH] char: hw_random: bcm2835: handle of_iomap failures in bcm2835 driver Arvind Yadav
2016-08-30 18:26 ` Eric Anholt
2016-09-07 13:19 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).