summaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random/mxc-rnga.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-09-13 01:19:50 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2015-09-21 16:00:38 +0200
commit1bf2138e9806ea436933d5a803547833f9524c8f (patch)
tree6e3db5c9c1ba9dff2e30f4fad1a41c91292b21b3 /drivers/char/hw_random/mxc-rnga.c
parentcrypto: qat - don't check for iommu (diff)
downloadlinux-1bf2138e9806ea436933d5a803547833f9524c8f.tar.xz
linux-1bf2138e9806ea436933d5a803547833f9524c8f.zip
hwrng: mxc-rnga - Remove unneeded goto label
We can simplify the code by returning the error code immediately instead of jumping to a goto label. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char/hw_random/mxc-rnga.c')
-rw-r--r--drivers/char/hw_random/mxc-rnga.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/char/hw_random/mxc-rnga.c b/drivers/char/hw_random/mxc-rnga.c
index 6cbb72ec6013..8803126c3330 100644
--- a/drivers/char/hw_random/mxc-rnga.c
+++ b/drivers/char/hw_random/mxc-rnga.c
@@ -160,13 +160,12 @@ static int __init mxc_rnga_probe(struct platform_device *pdev)
mxc_rng->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(mxc_rng->clk)) {
dev_err(&pdev->dev, "Could not get rng_clk!\n");
- err = PTR_ERR(mxc_rng->clk);
- goto out;
+ return PTR_ERR(mxc_rng->clk);
}
err = clk_prepare_enable(mxc_rng->clk);
if (err)
- goto out;
+ return err;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
mxc_rng->mem = devm_ioremap_resource(&pdev->dev, res);
@@ -187,8 +186,6 @@ static int __init mxc_rnga_probe(struct platform_device *pdev)
err_ioremap:
clk_disable_unprepare(mxc_rng->clk);
-
-out:
return err;
}