From patchwork Fri Nov 23 08:41:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 13128 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 B44B923FCD for ; Fri, 23 Nov 2012 08:48:20 +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 65BF4A19042 for ; Fri, 23 Nov 2012 08:48:20 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so1528362ieb.11 for ; Fri, 23 Nov 2012 00:48:20 -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=Ts5GdqeiFwOHgLIgHik2T4qxuJKEFHMw7spCUdqqEmPUzK29bZmIGWxaWLghXvu8RC L8y7uNmfn+9tIE+bLY3AK6BIvobGRt6saBtAtvcRGuGnh+VbEU0gUx05Oe2bMlnWzMoI i/Y/rWt5hd0a0Bi3PjNd74DzqP6BZJhXw/fxuOLAFKL0fl+y81Bq3j3uqQCTw1XakiXG gyDTVPEINlPt01LHrpk+MwVKV72T22YcQElqDg5EfKwGTsvnuhivjy3+fisxyFzmtEZs 03EjHEOlA1Ihe40jwDSEKKYzifDln6AzSfBZXU4k1QzpE22XMUwcXt2jn9tSaH052bCt Igfw== Received: by 10.50.213.69 with SMTP id nq5mr5448414igc.70.1353660500162; Fri, 23 Nov 2012 00:48:20 -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 n20csp320654igt; Fri, 23 Nov 2012 00:48:19 -0800 (PST) Received: by 10.69.1.73 with SMTP id be9mr12524548pbd.116.1353660499302; Fri, 23 Nov 2012 00:48:19 -0800 (PST) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by mx.google.com with ESMTPS id uq10si7984200pbc.17.2012.11.23.00.48.19 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Nov 2012 00:48:19 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.47 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.220.47; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.47 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-f47.google.com with SMTP id fa10so1188798pad.6 for ; Fri, 23 Nov 2012 00:48:19 -0800 (PST) Received: by 10.68.238.72 with SMTP id vi8mr12366051pbc.55.1353660499058; Fri, 23 Nov 2012 00:48:19 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id jw10sm3495481pbb.20.2012.11.23.00.48.15 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Nov 2012 00:48:18 -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 RESEND 1/4] i2c: s3c2410: Remove unnecessary label err_noclk Date: Fri, 23 Nov 2012 14:11:52 +0530 Message-Id: <1353660115-9710-2-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353660115-9710-1-git-send-email-tushar.behera@linaro.org> References: <1353660115-9710-1-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQkh8g0+EbweDvwZEQdZav96nN0s4nH/UjNpMC3eQ0kgNXCugo+1LUXY5j19EEYMyOnshHHJ 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; }