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: 191808 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp214537ilg; Thu, 25 Jun 2020 23:58:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHvXO68otQ18jvrYozwC9Hf9TJJC7+TMwfo3Co473ZzO6Cp7/zRzahVN7/tx1NE9HpdO9w X-Received: by 2002:aa7:c314:: with SMTP id l20mr1999063edq.150.1593154694540; Thu, 25 Jun 2020 23:58:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593154694; cv=none; d=google.com; s=arc-20160816; b=LgcWVPdEr16Y7iMix0wfCWxFOFOpEabnXzo/oW3FR+R8376y/9P6IGHklktuwz+89w C26VrxwG/QHc0CESkVirmEZxb6EMxgOn4tnMFxQ+O1YmpfFdaRWy2vL1nJDzcAvwohEA t+zY/nqEp5tV/8tOwC9k7GQM7U3RbooPgyf/87EtelSIjjAYJ8KlXwI0pmlX8w2Z1O4m 6zcivHXBVNwsfMlgc93CBFmlkXXyBvrRPsJ4946C7fSTDMuY8DCKDh1hCN0nLB63CEPi uyj1uuIIssdGOc7l/9dhE7wg8ZRhlh+KIEEz31XTcAB58qI/IF4u1VhEVJdG9zpPuuH2 +otw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Vqpawo5MJsJOmOd5oGBoADQ9AShkAYfWIevIqG7XtBk=; b=GW5ZLZ8CgiaTQKcTqqXLEKJKL4d8zTLtubqMm8cBTe1GRUyA/GC47/1Yi72jDSeGkm cm347Q9+SJ0kUcfmj/kA3OlSHh8LlYYEj/BJah8aMwn3GvYHyO4lo6e8D3TJFyhjMzHI 1oAEe1qiNGEjJIpjFRHmQqqs3/vnKmDafHjuJV9pNi3Ugfb3aLunhwJmiho+xhY0kTXg lXZKpb1CJo/PedPzpPM+lX6TYGki9ThfhqrgcLMeHvoQHYZrjqOuk1xN3d9h8V1SiFzk EhDYsy3g2Lg8TKW1Ul5ZEl3o2Iqbu1KRzlsZzXEM4VvvmzRpP5WTTdxXWDdw14kHPLw1 QPEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SKp3jqiW; spf=pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si1541172eds.492.2020.06.25.23.58.14; Thu, 25 Jun 2020 23:58:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SKp3jqiW; spf=pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728684AbgFZG6L (ORCPT + 4 others); Fri, 26 Jun 2020 02:58:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728612AbgFZG5u (ORCPT ); Fri, 26 Jun 2020 02:57:50 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9480C08C5DD for ; Thu, 25 Jun 2020 23:57:49 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id s10so8325443wrw.12 for ; Thu, 25 Jun 2020 23:57:49 -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=aB2IFh/sXlylcakHWSz3hLDa18CP34Nqsf9GEKMn3Dp3jyrE83ID9qYAJAuZT1z0C4 OQ/Y6sePxLfhc0ol5I+n6Hf44ArU2hw6valb6IvFZ8xkQB+3aomWdrFYA7jJlXwM7//b ULAAzyK86ysZnSYAbGlMKs8QM7NoxPAWEut1Gz41ZW1I94a1SmiJXZKz9vTH6fpYgQWF edHgxS0TJwJeJFzqZWvXqrtle3Lw50BUyLpr0EJHUh+HCtl40vNdVoflY2OHQbA2cpRE s67jLZxRnlC8LxP+/qjlRxI1w7Ko/QTDwX6b6gCsMrdDkXxbdk5lu/TJMzJCONkzmCIJ U3Mg== X-Gm-Message-State: AOAM5320UvsQaB8094Dr1SBuwUQDNcy1+G1rGqkq3mHHkkJawDEpeX+L RXFlsM+MckU8wBpDOCoPDkt/vQ== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lee Jones , Russ Dill , Keerthy , AnilKumar Ch , linux-omap@vger.kernel.org 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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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(+) -- 2.25.1 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; }