hwrng: mxc-rnga - Remove unneeded goto label
authorFabio Estevam <fabio.estevam@freescale.com>
Sat, 12 Sep 2015 23:19:50 +0000 (20:19 -0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 21 Sep 2015 14:00:38 +0000 (22:00 +0800)
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>
drivers/char/hw_random/mxc-rnga.c

index 6cbb72ec60131ab248237921d733e5f659728ebc..8803126c3330852013556a56bfb5a87b9330d544 100644 (file)
@@ -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;
 }