Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1472502
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] char: hw_random: bcm2835: handle of_iomap failures in bcm2835 driver |
| Date | 2016-08-30 16:10 +0200 |
| Message-ID | <sbRTI-5Ua-43@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] char: hw_random: bcm2835: handle of_iomap failures in bcm2835 driver Arvind Yadav <arvind.yadav.cs@gmail.com> - 2016-08-30 16:10 +0200 Re: [PATCH] char: hw_random: bcm2835: handle of_iomap failures in bcm2835 driver Eric Anholt <eric@anholt.net> - 2016-08-30 20:30 +0200 Re: [PATCH] char: hw_random: bcm2835: handle of_iomap failures in bcm2835 driver Herbert Xu <herbert@gondor.apana.org.au> - 2016-09-07 15:30 +0200
csiph-web