From patchwork Thu Jan 24 10:11:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 14261 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 8F02923F02 for ; Thu, 24 Jan 2013 10:20:11 +0000 (UTC) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by fiordland.canonical.com (Postfix) with ESMTP id 3B240A1867D for ; Thu, 24 Jan 2013 10:20:11 +0000 (UTC) Received: by mail-ve0-f173.google.com with SMTP id b10so1386731vea.18 for ; Thu, 24 Jan 2013 02:20:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=q1iKxcLfUJ+w96572VwMnhi9RHNIy2NW+DQyw2H3kVc=; b=cjZuA9KMP9AlEeMAI2zKHSyzo/KBd4KM3rrBwqg3v0xA4jhf0wcrMtTw0lEL7yiibD 8B8TQ+1Mb2DHulq/L62ATCVpdCD+B/G8YFyoliE+jm7ER0HsOzV9Bg9GYCQK1+tKF589 P03tU2cLK3CkKAFoTq+/9+ngcDrVvVz92/8KXWU4lqCTnGKu6CbLGMWKUVXy/8GHF474 ZGipYi+gVTytdgZHuIWJPherl4IeeX2dQdWYmdknPWTBiNREux+gADnZR6BpJpcjn/6s 8OOhzhXjN4JoIHTaPu2ms5ZVbPWRYyNxtDzV2E3+Aq6TPRKDAQx4aMaw/EZA7zYbmHyR 2S9g== X-Received: by 10.221.0.79 with SMTP id nl15mr1300274vcb.41.1359022810688; Thu, 24 Jan 2013 02:20:10 -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.58.145.101 with SMTP id st5csp56436veb; Thu, 24 Jan 2013 02:20:09 -0800 (PST) X-Received: by 10.68.143.100 with SMTP id sd4mr3355624pbb.107.1359022809598; Thu, 24 Jan 2013 02:20:09 -0800 (PST) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx.google.com with ESMTPS id x6si23795441pay.267.2013.01.24.02.20.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Jan 2013 02:20:09 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.54 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.160.54; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.54 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-pb0-f54.google.com with SMTP id rr4so3498860pbb.27 for ; Thu, 24 Jan 2013 02:20:09 -0800 (PST) X-Received: by 10.68.233.197 with SMTP id ty5mr3624068pbc.9.1359022809202; Thu, 24 Jan 2013 02:20:09 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id ho4sm14625980pbc.54.2013.01.24.02.20.04 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 24 Jan 2013 02:20:07 -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 V3 1/4] i2c: s3c2410: Remove unnecessary label err_noclk Date: Thu, 24 Jan 2013 15:41:06 +0530 Message-Id: <1359022269-12593-2-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1359022269-12593-1-git-send-email-tushar.behera@linaro.org> References: <1359022269-12593-1-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQnECWujbkk3g726rBQjGWoD5P6pXvHbPOnG4V5RcrI6Pc+U8hntCY4LJeXNwiXVt9YsXdi/ 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 --- Changes since V2: * Rebased to v3.8-rc4. 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 a290d08..b7ca1f4 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; }