summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2013-01-24 15:41:06 +0530
committerWolfram Sang <w.sang@pengutronix.de>2013-01-28 05:26:44 +0100
commit669da30d4c972fe62e14a435abf909d19d9b9467 (patch)
tree7865d4782b43041d0d768243c9e41432617b3e47 /drivers/i2c
parent876ae85c8b811668c2c115ea78c2241f562977fb (diff)
i2c: s3c2410: Remove unnecessary label err_noclk
err_noclk label redirects to a simple return statement. Move the return statement to the caller location and remove the label. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-s3c2410.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index a290d089ceaf..b7ca1f49d548 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1000,8 +1000,8 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
i2c->pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
if (!i2c->pdata) {
- ret = -ENOMEM;
- goto err_noclk;
+ dev_err(&pdev->dev, "no memory for platform data\n");
+ return -ENOMEM;
}
i2c->quirks = s3c24xx_get_device_quirks(pdev);
@@ -1025,8 +1025,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
i2c->clk = clk_get(&pdev->dev, "i2c");
if (IS_ERR(i2c->clk)) {
dev_err(&pdev->dev, "cannot get clock\n");
- ret = -ENOENT;
- goto err_noclk;
+ return -ENOENT;
}
dev_dbg(&pdev->dev, "clock source %p\n", i2c->clk);
@@ -1133,8 +1132,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
err_clk:
clk_disable_unprepare(i2c->clk);
clk_put(i2c->clk);
-
- err_noclk:
return ret;
}