From patchwork Fri Jun 26 06:57:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11627239 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F38D913 for ; Fri, 26 Jun 2020 11:26:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 269A820724 for ; Fri, 26 Jun 2020 11:26:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nYkASjhv"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="FpuTFE6Q"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SKp3jqiW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 269A820724 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SMXuIHAwBkDvnhs+ci1pLCmoH/VldF1rkpBmG7T/mjk=; b=nYkASjhv6bCiioNYhyn8MSN9X 7SaHLzdLI/m7/P+UsoXd2cKL7T7x2jkk+rLGNBLYamij0t18FAbIEJZwPQpwmvl8F7LJfB/xrAGV+ HwPoV9B0QFjEGnweDQjouiGbMbxwekUqR29/t4hpQNV+Ac5DwoX7QOB0osjq9Ij+ufc40u+uNQvQR VQmgwVOiAFTfZwjRx09RW63hikoMsLYQ+UeGkRskuD3UolP4a5ujKeruLNoJosCQEvbZhOmDfmNzR fJ5hLMOzKlK/2Cj0HwEhpgAnjYGDdl3ISTszUwec5Jk9zpM1Vy5gBQFLKLZxJmk0c6xmkYW7ALmG/ DEKy6dTfw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jomTR-0001gO-Bk; Fri, 26 Jun 2020 11:24:49 +0000 Received: from casper.infradead.org ([90.155.50.34]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jolEf-0000YK-Mi for linux-arm-kernel@merlin.infradead.org; Fri, 26 Jun 2020 10:05:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=Vqpawo5MJsJOmOd5oGBoADQ9AShkAYfWIevIqG7XtBk=; b=FpuTFE6QlQaENPGbvpZGUej0qx 35JDbc66tx6aZNOEr/3rSE0tumN6/i0DxDq5V3N9OzDITHcnLSLBQ1QKLER7YrNJ/45fNPHaaCiYN dUGCotWIptUkQ6aqymsLXuDLqvOFCpUTDxgKjYEJvJZjZnpJhqL5sAhYM7Eawp7mwLNfgaF/fmPOL NegxhBLuZMjmau2D3nQXlQZw9dO3Zk3/PaPLkKdVelxA1yZeW/vjC5TWibLHv7rSJ4URXAKWU6O4F lD+lG1w7MwWJoeAX+xJ6C1cOB7Xgau7OvGmHsfA8jsRDM+Z1SOqQP8qV55E6VFdFkgzjWb9lMA6MW 2CW07Kwg==; Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jokxi-0006ZB-Qt for linux-arm-kernel@lists.infradead.org; Fri, 26 Jun 2020 09:48:22 +0000 Received: by mail-lj1-x242.google.com with SMTP id s1so9677026ljo.0 for ; Fri, 26 Jun 2020 02:47:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Vqpawo5MJsJOmOd5oGBoADQ9AShkAYfWIevIqG7XtBk=; b=SKp3jqiWYrIXN0jB0OY408JIuyw4za4+UhL8h4rqgsIDHOoRrIpyJa6mqRtdVOps/0 mgEnzvPXKOyVwiok9xc3e/aGae/TCe+lyKlYblCgxaVLB7fMbQtnu11Fo+LZk4h2UfVY 8P1sCwqocGnNgb/S8jhEd6RpJSjY68unkDdCp+pHLc9YZnYIj1UgvuxvRk19OyaAut+a LmXMXl6hD2/rB7lZdVRXsKPxUxXp+btTwbd/amNtSAhDR5xvBKGtFOiZlDYFOrCx0d27 8kN6CjSFPWag25rf6VgKqLU1xAHYvr3vl9ay5I0DYXrHesL43//ThifVueOcz0HuZEjY gVIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Vqpawo5MJsJOmOd5oGBoADQ9AShkAYfWIevIqG7XtBk=; b=t5Ug+dodNJEhjvk0sSeDaoSdWxVuXxCHJROcCxagexDgwAomxkeWK/qg5Xaw/G6qCb KvAqE31PdScQLFNY4kuxqiw5mXwkI4d+/LRMoq7WtDPkcwY5KzBtor8SWVn49JAtktY+ SWFEFX/F/hKdvSAezk6fEh4mww9XiltKWYP2nvg8QmlkHEsr7du80oXHiyI9fXaDP4JK r8mUBK8tDvTEwIGCb4Ikny6SHInnkxg+RRN32XUzk8lTBYbo5FH3Vyh4pVF6OhHz6SsX LbWkscZ9kpQQ0EHCfaLEcLM1vcLPOQVBLdZE9scXaKsoETEQOMA0NWgAZGy5kZafeT1q 7ZRA== X-Gm-Message-State: AOAM530Z21mYbNC07DtKe5UUoTXk3SLT9tak7UrgI3el6mv9o60TB5cx B3BqCkZn86LsxtMjEIyWmTIRCX8lGPg= X-Google-Smtp-Source: ABdhPJzUZcx9JMvk0I42jptf4iOIhyswi9h4IvKidFSgFgUMg8zyNP/ZGhoR0T7CSf8Q1Xinyvy5Tw== X-Received: by 2002:adf:9307:: with SMTP id 7mr2062805wro.414.1593154668628; Thu, 25 Jun 2020 23:57:48 -0700 (PDT) Received: from localhost.localdomain ([2.27.35.144]) by smtp.gmail.com with ESMTPSA id x18sm15355269wmi.35.2020.06.25.23.57.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2020 23:57:48 -0700 (PDT) From: Lee Jones To: broonie@kernel.org, lgirdwood@gmail.com Subject: [PATCH 6/9] regulator: tps65217-regulator: Use the returned value of tps65217_reg_read() Date: Fri, 26 Jun 2020 07:57:35 +0100 Message-Id: <20200626065738.93412-7-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200626065738.93412-1-lee.jones@linaro.org> References: <20200626065738.93412-1-lee.jones@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200626_104759_394004_FBE9F884 X-CRM114-Status: GOOD ( 13.93 ) X-Spam-Score: -2.1 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:242 listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Keerthy , linux-kernel@vger.kernel.org, Russ Dill , AnilKumar Ch , linux-omap@vger.kernel.org, Lee Jones , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Until now the aforementioned return value has been ignored. Previous and current calls to tps65217_reg_read() return instantly when the value is not 0, so let's do that. Fixes the following W=1 warning: drivers/regulator/tps65217-regulator.c: In function ‘tps65217_regulator_probe’: drivers/regulator/tps65217-regulator.c:227:9: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 227 | int i, ret; | ^~~ Cc: Russ Dill Cc: Keerthy Cc: AnilKumar Ch Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones --- drivers/regulator/tps65217-regulator.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c index f2d3a4a9f3e77..3f5ea029e2e3f 100644 --- a/drivers/regulator/tps65217-regulator.c +++ b/drivers/regulator/tps65217-regulator.c @@ -254,6 +254,9 @@ static int tps65217_regulator_probe(struct platform_device *pdev) /* Store default strobe info */ ret = tps65217_reg_read(tps, regulators[i].bypass_reg, &val); + if (ret) + return ret; + tps->strobes[i] = val & regulators[i].bypass_mask; }