From patchwork Tue Feb 18 10:40:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24820 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 43F99203C5 for ; Tue, 18 Feb 2014 10:46:54 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id g12sf68961638oah.10 for ; Tue, 18 Feb 2014 02:46:53 -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=cQnOBk2Op7PSg8xmt4GRD59UGyXvRMzXpPZtKyL3/OA=; b=GETm+nLQzIhXn7Aal9eJa7O68gGp32LWcO1eUZ4OqJ0C1Sx9GCuoU6DGvNOK8s3zUn g7NMsEjSIddcsoolncL7Sdk8yt6lT/poq2/TF5kcZ2yydv5V+8sbQFJM5ckhkVE66jiF TtGdAFCEghxV3fAb7gVyHv3raCT6/7Te/mv+gz5r9ORMO+C2av/uvxRVsaka9rvV7oub cI86esPIiyZ/SSxPCu89ZbiLtUv1SRbFxEewS9cJIOUZGt5WcTH1LGOn6x8e+mHMSWBS V+aZt8LhKFRdu/EtOJ8FCiCah5uCft5UClFnIyxd9lgzqcD74IhWySBHKWiB604KnzD0 3/OQ== X-Gm-Message-State: ALoCoQke6C4+xDmTfzdaFKetgwgW9BivF5oHCam2mHXKr2ZYQGogbl7P5lD4FR3nrHD6gWdvAaoJ X-Received: by 10.182.28.36 with SMTP id y4mr12635348obg.46.1392720413292; Tue, 18 Feb 2014 02:46:53 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.33 with SMTP id 30ls1260706qgs.22.gmail; Tue, 18 Feb 2014 02:46:53 -0800 (PST) X-Received: by 10.220.106.7 with SMTP id v7mr1577876vco.46.1392720413166; Tue, 18 Feb 2014 02:46:53 -0800 (PST) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id us10si5369850vcb.134.2014.02.18.02.46.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 02:46:53 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.179 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.179; Received: by mail-vc0-f179.google.com with SMTP id lh14so12663777vcb.24 for ; Tue, 18 Feb 2014 02:46:53 -0800 (PST) X-Received: by 10.220.250.203 with SMTP id mp11mr20365058vcb.2.1392720413032; Tue, 18 Feb 2014 02:46:53 -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 u4csp207176vcz; Tue, 18 Feb 2014 02:46:52 -0800 (PST) X-Received: by 10.66.102.39 with SMTP id fl7mr31834071pab.43.1392720412229; Tue, 18 Feb 2014 02:46:52 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wm3si17902061pab.49.2014.02.18.02.46.51; Tue, 18 Feb 2014 02:46:51 -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 S1754917AbaBRKqq (ORCPT + 27 others); Tue, 18 Feb 2014 05:46:46 -0500 Received: from mail-pd0-f180.google.com ([209.85.192.180]:32950 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754866AbaBRKqn (ORCPT ); Tue, 18 Feb 2014 05:46:43 -0500 Received: by mail-pd0-f180.google.com with SMTP id x10so16150154pdj.11 for ; Tue, 18 Feb 2014 02:46:42 -0800 (PST) X-Received: by 10.66.138.40 with SMTP id qn8mr9239671pab.154.1392720402570; Tue, 18 Feb 2014 02:46:42 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id gj9sm5442084pbc.7.2014.02.18.02.46.35 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 02:46:37 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 01/15] regulator: wm8350: Do not hardcode return value Date: Tue, 18 Feb 2014 16:10:57 +0530 Message-Id: <1392720071-13503-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.179 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: , Propagate the error value returned by the function instead. Signed-off-by: Sachin Kamat --- drivers/regulator/wm8350-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c index de7b9c73e3fa..7ec7c390eeda 100644 --- a/drivers/regulator/wm8350-regulator.c +++ b/drivers/regulator/wm8350-regulator.c @@ -361,7 +361,7 @@ static int wm8350_dcdc_set_suspend_voltage(struct regulator_dev *rdev, int uV) sel = regulator_map_voltage_linear(rdev, uV, uV); if (sel < 0) - return -EINVAL; + return sel; /* all DCDCs have same mV bits */ val = wm8350_reg_read(wm8350, volt_reg) & ~WM8350_DC1_VSEL_MASK; @@ -574,7 +574,7 @@ static int wm8350_ldo_set_suspend_voltage(struct regulator_dev *rdev, int uV) sel = regulator_map_voltage_linear_range(rdev, uV, uV); if (sel < 0) - return -EINVAL; + return sel; /* all LDOs have same mV bits */ val = wm8350_reg_read(wm8350, volt_reg) & ~WM8350_LDO1_VSEL_MASK;