From patchwork Tue Feb 18 10:41:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24823 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9957820676 for ; Tue, 18 Feb 2014 10:47:17 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id f11sf30580066qae.3 for ; Tue, 18 Feb 2014 02:47:17 -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:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=TR1pC50mYS+1cnU7RX/cT3PK0h4gE8l+MOdbG5KgQTE=; b=HbHCtDwLA7UCqCylzJB5Gz/vvOiQh01UVdWhjofXFlPbu8CBMCSocI2EFq3H9DysGG pdD7NqaC1qxjlwngPv7YIN5jgym0csKaSLzPgJ1CuWG0/6o1yilbXGCfGaQwQcab/xJt GHSL+SYoFwbfd3NtSissQav/A05LavZYuKL1KqfaBiHEZZVlu1oDzQkXB5tj1x/Npkgh wk0Tz+dFdHMsuyKpWc9me4vFoWuXpgCDKUwJJlOpEsSgNghzY02tjUMhIypZiWhOc6Z5 r3nENwB9k9CTGz8dmm0ygBLQmNlxqrESqYfMJEQGu4nOOgF8VtmFtmclJowCarOetoqb G4qg== X-Gm-Message-State: ALoCoQkGlBEEb2fPNI/xpbQWBuTzF4fQJta7t8DQtMM1DoZh9kf3Pv113C4kimSVwDSXU1kaztbc X-Received: by 10.52.96.39 with SMTP id dp7mr10886698vdb.3.1392720437403; Tue, 18 Feb 2014 02:47:17 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.43.201 with SMTP id e67ls1298263qga.32.gmail; Tue, 18 Feb 2014 02:47:17 -0800 (PST) X-Received: by 10.52.102.235 with SMTP id fr11mr1318682vdb.51.1392720437264; Tue, 18 Feb 2014 02:47:17 -0800 (PST) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id av10si5383801ved.74.2014.02.18.02.47.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 02:47:17 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.180 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.180; Received: by mail-vc0-f180.google.com with SMTP id ks9so12530787vcb.25 for ; Tue, 18 Feb 2014 02:47:17 -0800 (PST) X-Received: by 10.52.30.230 with SMTP id v6mr17311893vdh.6.1392720437160; Tue, 18 Feb 2014 02:47:17 -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 u4csp207194vcz; Tue, 18 Feb 2014 02:47:16 -0800 (PST) X-Received: by 10.68.139.73 with SMTP id qw9mr31830318pbb.121.1392720436179; Tue, 18 Feb 2014 02:47:16 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wm3si17866986pab.252.2014.02.18.02.47.15; Tue, 18 Feb 2014 02:47:15 -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 S1755069AbaBRKrI (ORCPT + 27 others); Tue, 18 Feb 2014 05:47:08 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:56041 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755037AbaBRKrD (ORCPT ); Tue, 18 Feb 2014 05:47:03 -0500 Received: by mail-pa0-f47.google.com with SMTP id kp14so16535632pab.34 for ; Tue, 18 Feb 2014 02:47:03 -0800 (PST) X-Received: by 10.66.121.164 with SMTP id ll4mr31854665pab.129.1392720422943; Tue, 18 Feb 2014 02:47:02 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id gj9sm5442084pbc.7.2014.02.18.02.47.00 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 02:47:02 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 07/15] regulator: lp3971: Do not hardcode return value Date: Tue, 18 Feb 2014 16:11:03 +0530 Message-Id: <1392720071-13503-7-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392720071-13503-1-git-send-email-sachin.kamat@linaro.org> References: <1392720071-13503-1-git-send-email-sachin.kamat@linaro.org> 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.180 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/lp3971.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c index 3b1102b75071..66fd2330dca0 100644 --- a/drivers/regulator/lp3971.c +++ b/drivers/regulator/lp3971.c @@ -327,7 +327,7 @@ static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count, return -EIO; ret = i2c_smbus_read_byte_data(i2c, reg); if (ret < 0) - return -EIO; + return ret; *dest = ret; return 0;