From patchwork Fri Nov 23 05:59:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 13116 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id EE8D424252 for ; Fri, 23 Nov 2012 06:05:37 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 97DC9A18970 for ; Fri, 23 Nov 2012 06:05:37 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so1416885ieb.11 for ; Thu, 22 Nov 2012 22:05:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=SRi0jd8vhhs727RZK5ju5U1wd3o+0/yFxpv8/kfnX34=; b=KyEkPPfhcH5FHzxkhOv/NoxMaM7g78LfKc0CACOZNo+/7CaM2vw1cYr5jpfAEmK6lW EC79IxPqiONfKP5e+80AX0JHim08F2y7ttZpQ4ap7KQHpRrJ3/WTP2raoGtv5OaDf1r/ t7i+ptbfg/duMbOWAGFNnfCWgeoGcPjvz2bZEa1iprmqbMDMjN1qgp3qRuApG5vDkxZB 37IFF5tH2uSDTC9GwuoLozm07T/78bcIIWQJ5RUhf5r4Azfi3KoZDyvyzfz2BSpyn/qG lx200H5k9T7ioyIjsaAS2N5KOFxgKwO/Lo4ttkJs0lxxJy+TSfhAMxnaDXchljs9T5u4 RC1w== Received: by 10.50.161.169 with SMTP id xt9mr5129472igb.62.1353650737053; Thu, 22 Nov 2012 22:05:37 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp307411igt; Thu, 22 Nov 2012 22:05:36 -0800 (PST) Received: by 10.68.209.136 with SMTP id mm8mr11232953pbc.146.1353650736512; Thu, 22 Nov 2012 22:05:36 -0800 (PST) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by mx.google.com with ESMTPS id zz3si7602806pbc.121.2012.11.22.22.05.36 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 22:05:36 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.43 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.220.43; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.43 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) smtp.mail=tushar.behera@linaro.org Received: by mail-pa0-f43.google.com with SMTP id fb10so4518499pad.16 for ; Thu, 22 Nov 2012 22:05:36 -0800 (PST) Received: by 10.68.211.42 with SMTP id mz10mr11480721pbc.100.1353650736264; Thu, 22 Nov 2012 22:05:36 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id oi3sm3271920pbb.1.2012.11.22.22.05.32 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 22:05:35 -0800 (PST) From: Tushar Behera 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 Message-Id: <1353650353-17576-2-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353650353-17576-1-git-send-email-tushar.behera@linaro.org> References: <1353650353-17576-1-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQldNYHr2+ReJWQNuOm6n6gxQT/WS1PtCQcr1pzNAm6uAmi/eRuYzX5QIGcnTsHMm1Si9Sg4 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 --- 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; }