From patchwork Wed Mar 27 11:23:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 15697 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 7B42A23E3E for ; Wed, 27 Mar 2013 11:34:56 +0000 (UTC) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by fiordland.canonical.com (Postfix) with ESMTP id 2D3AAA1817A for ; Wed, 27 Mar 2013 11:34:56 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id fr13so5100494vbb.31 for ; Wed, 27 Mar 2013 04:34:55 -0700 (PDT) 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 :x-gm-message-state; bh=eyaJ/5fH/hciNQ0ZMyjN98p/MeSRdrmX4XZVbjn3pBQ=; b=lSKPciJveBYEzm/QXcz7UCxwOgxgwLTx7bEVZ5/oyciFVWPfdcGnWb/awQdnppaiWn YrH/IGbZSfSqMgUQjAgRIew9t8c7gpUd0VPpD2kxf2l46J9vVm/A2eSmYyxpftt+YLmI 4HN9P9nmIg4m5pKTkIJ1yRc131WJCDDtR4E0KVwozQjV5TfGMcq42BE3RJTmmmvwfUIV 9F5BS6a4rQXoCMLtJ9DlpOYe6eTKaQR51aY246tRtolW7f0bR4JniofaQ6MAgTUJ/bFt dt2dkTMLM5L/wB27uUJWL4CUJf6GTTb21jggrxXAtmKGLLD+ZnUEfCHWGlzP9K4k1AaL 3QmA== X-Received: by 10.220.150.74 with SMTP id x10mr2372473vcv.68.1364384095669; Wed, 27 Mar 2013 04:34:55 -0700 (PDT) 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.59.4.204 with SMTP id cg12csp111630ved; Wed, 27 Mar 2013 04:34:55 -0700 (PDT) X-Received: by 10.66.157.36 with SMTP id wj4mr17630007pab.88.1364384094651; Wed, 27 Mar 2013 04:34:54 -0700 (PDT) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by mx.google.com with ESMTPS id vf5si14202256pbc.141.2013.03.27.04.34.54 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Mar 2013 04:34:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.49 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.49; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.49 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f49.google.com with SMTP id kp14so1831978pab.8 for ; Wed, 27 Mar 2013 04:34:54 -0700 (PDT) X-Received: by 10.66.149.73 with SMTP id ty9mr29556258pab.66.1364384094157; Wed, 27 Mar 2013 04:34:54 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id to7sm8093507pab.0.2013.03.27.04.34.51 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 27 Mar 2013 04:34:53 -0700 (PDT) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: cw00.choi@samsung.com, myungjoo.ham@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/2] extcon: max77693: Fix return value Date: Wed, 27 Mar 2013 16:53:29 +0530 Message-Id: <1364383410-15093-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQnJeHlEuZe1kICkkW32QLRTD7CgrGhwmesqcfp63BzAWQUzdvRtgzgdCacSVqS3wfzuVAsE Return the value obtained from the function instead of hardcoding. Silences the following warning: drivers/extcon/extcon-max77693.c:297 max77693_muic_set_path() info: why not propagate 'ret' from max77693_update_reg() instead of (-11)? drivers/extcon/extcon-max77693.c:310 max77693_muic_set_path() info: why not propagate 'ret' from max77693_update_reg() instead of (-11)? Signed-off-by: Sachin Kamat --- drivers/extcon/extcon-max77693.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c index 8f3c947..894e20e 100644 --- a/drivers/extcon/extcon-max77693.c +++ b/drivers/extcon/extcon-max77693.c @@ -294,7 +294,7 @@ static int max77693_muic_set_path(struct max77693_muic_info *info, MAX77693_MUIC_REG_CTRL1, ctrl1, COMP_SW_MASK); if (ret < 0) { dev_err(info->dev, "failed to update MUIC register\n"); - return -EAGAIN; + return ret; } if (attached) @@ -307,7 +307,7 @@ static int max77693_muic_set_path(struct max77693_muic_info *info, CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK); if (ret < 0) { dev_err(info->dev, "failed to update MUIC register\n"); - return -EAGAIN; + return ret; } dev_info(info->dev,