Browse Source

drivers/rtc/rtc-mxc.c: remove unneeded label

There is no need to jump to the 'exit_free_pdata' label when
devm_clk_get() fails, as we can directly return the error and simplify the
code a bit.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Fabio Estevam 11 years ago
parent
commit
fbd5e754cb
1 changed files with 1 additions and 4 deletions
  1. 1 4
      drivers/rtc/rtc-mxc.c

+ 1 - 4
drivers/rtc/rtc-mxc.c

@@ -391,8 +391,7 @@ static int mxc_rtc_probe(struct platform_device *pdev)
 	pdata->clk = devm_clk_get(&pdev->dev, NULL);
 	pdata->clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(pdata->clk)) {
 	if (IS_ERR(pdata->clk)) {
 		dev_err(&pdev->dev, "unable to get clock!\n");
 		dev_err(&pdev->dev, "unable to get clock!\n");
-		ret = PTR_ERR(pdata->clk);
-		goto exit_free_pdata;
+		return PTR_ERR(pdata->clk);
 	}
 	}
 
 
 	clk_prepare_enable(pdata->clk);
 	clk_prepare_enable(pdata->clk);
@@ -447,8 +446,6 @@ static int mxc_rtc_probe(struct platform_device *pdev)
 exit_put_clk:
 exit_put_clk:
 	clk_disable_unprepare(pdata->clk);
 	clk_disable_unprepare(pdata->clk);
 
 
-exit_free_pdata:
-
 	return ret;
 	return ret;
 }
 }