From: Tushar Behera <tushar.behera@linaro.org>
To: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-samsung-soc@vger.kernel.org
Cc: w.sang@pengutronix.de, kgene.kim@samsung.com, patches@linaro.org
Subject: [PATCH 1/7] i2c: s3c2410: Remove unnecessary label err_noclk
Date: Fri, 23 Nov 2012 11:29:07 +0530 [thread overview]
Message-ID: <1353650353-17576-2-git-send-email-tushar.behera@linaro.org> (raw)
In-Reply-To: <1353650353-17576-1-git-send-email-tushar.behera@linaro.org>
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>
---
drivers/i2c/busses/i2c-s3c2410.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 3e0335f..7522f40 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -945,8 +945,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);
@@ -971,8 +971,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);
@@ -1084,8 +1083,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;
}
--
1.7.4.1
next prev parent reply other threads:[~2012-11-23 5:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-23 5:59 [PATCH 0/7] i2c: s3c2410: Add devm_* apis and cleanup Tushar Behera
2012-11-23 5:59 ` Tushar Behera [this message]
2012-11-23 5:59 ` [PATCH 2/7] i2c: s3c2410: Convert to use devm_clk_get() Tushar Behera
2012-11-23 5:59 ` [PATCH 4/7] i2c: s3c2410: Convert to use devm_ioremap() Tushar Behera
[not found] ` <1353650353-17576-5-git-send-email-tushar.behera-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-11-23 6:14 ` Sachin Kamat
2012-11-23 6:43 ` Tushar Behera
2012-11-23 5:59 ` [PATCH 5/7] i2c: s3c2410: Convert to use devm_request_irq() Tushar Behera
2012-11-23 5:59 ` [PATCH 6/7] i2c: s3c2410: Move location of clk_prepare_enable() call in probe function Tushar Behera
[not found] ` <1353650353-17576-1-git-send-email-tushar.behera-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-11-23 5:59 ` [PATCH 3/7] i2c: s3c2410: Convert to use devm_request_mem_region() Tushar Behera
2012-11-23 5:59 ` [PATCH 7/7] i2c: s3c2410: Remove err_cpufreq label Tushar Behera
2012-11-23 6:15 ` [PATCH 0/7] i2c: s3c2410: Add devm_* apis and cleanup Shubhrajyoti Datta
[not found] ` <CAM=Q2cs=oYq4e17LXxUEhATiYLAjnzoTH-+nsO5KNQwGj2qSBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-23 6:44 ` Tushar Behera
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1353650353-17576-2-git-send-email-tushar.behera@linaro.org \
--to=tushar.behera@linaro.org \
--cc=kgene.kim@samsung.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=patches@linaro.org \
--cc=w.sang@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).