diff options
-rw-r--r-- | drivers/char/hw_random/nomadik-rng.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/hw_random/nomadik-rng.c b/drivers/char/hw_random/nomadik-rng.c index dd1d143eb8ea..52e08ca3ccd7 100644 --- a/drivers/char/hw_random/nomadik-rng.c +++ b/drivers/char/hw_random/nomadik-rng.c | |||
@@ -55,7 +55,7 @@ static int nmk_rng_probe(struct amba_device *dev, const struct amba_id *id) | |||
55 | 55 | ||
56 | ret = amba_request_regions(dev, dev->dev.init_name); | 56 | ret = amba_request_regions(dev, dev->dev.init_name); |
57 | if (ret) | 57 | if (ret) |
58 | return ret; | 58 | goto out_clk; |
59 | ret = -ENOMEM; | 59 | ret = -ENOMEM; |
60 | base = ioremap(dev->res.start, resource_size(&dev->res)); | 60 | base = ioremap(dev->res.start, resource_size(&dev->res)); |
61 | if (!base) | 61 | if (!base) |
@@ -70,6 +70,7 @@ out_unmap: | |||
70 | iounmap(base); | 70 | iounmap(base); |
71 | out_release: | 71 | out_release: |
72 | amba_release_regions(dev); | 72 | amba_release_regions(dev); |
73 | out_clk: | ||
73 | clk_disable(rng_clk); | 74 | clk_disable(rng_clk); |
74 | clk_put(rng_clk); | 75 | clk_put(rng_clk); |
75 | return ret; | 76 | return ret; |