From patchwork Wed Feb 12 09:10:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24520 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7515D203F3 for ; Wed, 12 Feb 2014 09:15:42 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id fp1sf17678683pdb.2 for ; Wed, 12 Feb 2014 01:15:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=efjVLYg4LvKMRbM2nClr2doVZ8B+J7ILIlPWxwOvxjk=; b=AzICYpvSKjSLFETqzkUsHfvAqVeR69BYwGjCiRUybDvzYdplSZcPooulCMuEK+HyF0 tLu5nRy/Nz7ef+jDYECFkH1d+2vOtryyL3Wcib8DWI4wXcnnCx4XSI4E4DS9q1gqva1C djgfVQyV9iZiPyDH28q1BumOh5R5a455EkNQH4OC7Cw/yM98LTZxa1e6qQ0Re4dQs91r xSm1mQBw818Kq7hBBD6ZDko3+xlqZkiDt4yxDk0RMNyMviGXNv2H6YFeeFV+Gn58TCxW KRtePV+Xa3NeVeXipqgAFR0i96QFYGihGZA/2LK1OpvgZu3B1XnJEpOHAGW4WeOVihPo xnDQ== X-Gm-Message-State: ALoCoQn2D/DgThy/B2pwjwJ8v3EXJGGG16GxqtV9gwMiRIRpyE4MDTF27fGitLq1ayorWaBSyith X-Received: by 10.66.149.67 with SMTP id ty3mr1228049pab.27.1392196541389; Wed, 12 Feb 2014 01:15:41 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.41 with SMTP id f38ls2765708qge.55.gmail; Wed, 12 Feb 2014 01:15:41 -0800 (PST) X-Received: by 10.52.246.42 with SMTP id xt10mr26852050vdc.9.1392196541237; Wed, 12 Feb 2014 01:15:41 -0800 (PST) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id y3si7069831vdo.97.2014.02.12.01.15.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 01:15:41 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id ij19so6741204vcb.20 for ; Wed, 12 Feb 2014 01:15:41 -0800 (PST) X-Received: by 10.52.110.201 with SMTP id ic9mr26934240vdb.22.1392196541159; Wed, 12 Feb 2014 01:15:41 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp21670vcz; Wed, 12 Feb 2014 01:15:40 -0800 (PST) X-Received: by 10.66.65.204 with SMTP id z12mr37770765pas.60.1392196540122; Wed, 12 Feb 2014 01:15:40 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si21977413pao.331.2014.02.12.01.15.39; Wed, 12 Feb 2014 01:15:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751521AbaBLJPb (ORCPT + 27 others); Wed, 12 Feb 2014 04:15:31 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:45644 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750711AbaBLJP1 (ORCPT ); Wed, 12 Feb 2014 04:15:27 -0500 Received: by mail-pa0-f43.google.com with SMTP id rd3so8919604pab.16 for ; Wed, 12 Feb 2014 01:15:26 -0800 (PST) X-Received: by 10.68.224.195 with SMTP id re3mr50236408pbc.93.1392196526846; Wed, 12 Feb 2014 01:15:26 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id bc4sm61451683pbb.2.2014.02.12.01.15.23 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 01:15:25 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: lee.jones@linaro.org, sachin.kamat@linaro.org Subject: [PATCH 1/4] mfd: wm8400-core: Remove unnecessary goto Date: Wed, 12 Feb 2014 14:40:10 +0530 Message-Id: <1392196213-20576-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Return directly to avoid redundant lines of code. Signed-off-by: Sachin Kamat --- drivers/mfd/wm8400-core.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/drivers/mfd/wm8400-core.c b/drivers/mfd/wm8400-core.c index d66d256551fb..8788fd1f0a83 100644 --- a/drivers/mfd/wm8400-core.c +++ b/drivers/mfd/wm8400-core.c @@ -161,31 +161,19 @@ static int wm8400_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct wm8400 *wm8400; - int ret; wm8400 = devm_kzalloc(&i2c->dev, sizeof(struct wm8400), GFP_KERNEL); - if (wm8400 == NULL) { - ret = -ENOMEM; - goto err; - } + if (wm8400 == NULL) + return -ENOMEM; wm8400->regmap = devm_regmap_init_i2c(i2c, &wm8400_regmap_config); - if (IS_ERR(wm8400->regmap)) { - ret = PTR_ERR(wm8400->regmap); - goto err; - } + if (IS_ERR(wm8400->regmap)) + return PTR_ERR(wm8400->regmap); wm8400->dev = &i2c->dev; i2c_set_clientdata(i2c, wm8400); - ret = wm8400_init(wm8400, dev_get_platdata(&i2c->dev)); - if (ret != 0) - goto err; - - return 0; - -err: - return ret; + return wm8400_init(wm8400, dev_get_platdata(&i2c->dev)); } static int wm8400_i2c_remove(struct i2c_client *i2c)