Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2508377imm; Mon, 24 Sep 2018 05:39:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbCb7X7UL+DIAhCEPAxUvzxsy7httYy+OeeOZeSel7wTdWN4ezBVl2rwBbXyz+lDRKGKdi9 X-Received: by 2002:a62:1d16:: with SMTP id d22-v6mr3603763pfd.159.1537792764677; Mon, 24 Sep 2018 05:39:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537792764; cv=none; d=google.com; s=arc-20160816; b=HUVxL1JHeTn2xoVAAcxi6kXteFL7M//LjEsfMn+RYBIvtcYozoKSx8OMfryShtLqjW uFSuwqREWw8Z0gcYzgAO49S0KTTyimph5BMq5Y8ATpP+pGqK/Xs8KA7ub9MkFKVrWIXg LCqrCdEEdpb2mm7lIxkXRdnmffVat6Vc2ulzxyn1rrEs7a+SOLRTCLdobRgar9U7BnuW j1H7dDXys6jV8euQavHvARH9kgqN9KJssqVapXrtr3bi0Psd8NNePOzs/DmgTxIJ3qLk lxeD81j1k1EQrRBIJM78R725SEYhGZ+6SiqZIP8z8qiW8FZA94PACuDOhsCOXM2TKUOh yoJw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=sjZHV0WAr4ph8Fb2+q1pj/BmNpXCCEAx16UM0LNCXkA=; b=XNdIwhHy2Erzj/gyPPPFAtyR529tekdFj3RGgVU+QUx7gqoa9eqT620nAcNQL4mlg/ BF7Ty5RXzPYAYTK1wFXXDpuWVY/qmAFJTG0RXmurfY2t2Y0wmHKxssZMKYNEejeLno0r YRGUmh2BlBHST/anGCO/OFaFRp+/PqcyZdD3AIEGx47o8vLz2/PAGugp+pjiv934b4jA l9YuCpiG9XUbt1xM9+QEvmZWs4PkBo8C8r0uZl3dCZcjl4a0CvFHAkXNelAidfrXG+Fs CcPKRBaskI6j5VmTmvieIhYiT+dgTlU4KUnEEzxfHIu9rH7RgGP7k658XIK8ZPLTzjy+ PPzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n10-v6si38280716pfb.316.2018.09.24.05.39.09; Mon, 24 Sep 2018 05:39:24 -0700 (PDT) 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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388096AbeIXSj5 (ORCPT + 99 others); Mon, 24 Sep 2018 14:39:57 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58650 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728937AbeIXSj5 (ORCPT ); Mon, 24 Sep 2018 14:39:57 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 2CB681092; Mon, 24 Sep 2018 12:37:59 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Niklas Cassel , Mark Brown , Sasha Levin Subject: [PATCH 4.18 089/235] regulator: qcom_spmi: Use correct regmap when checking for error Date: Mon, 24 Sep 2018 13:51:15 +0200 Message-Id: <20180924113114.008977758@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Niklas Cassel [ Upstream commit 85046a15529606466bc778e1205f4cab8e3724d1 ] Since we have just assigned saw_regmap, and since the error message refers to saw_regmap, it feels safe to assume that it is saw_regmap, and not regmap, that should be checked for errors. Fixes: 0caecaa87202 ("regulator: qcom_spmi: Add support for SAW") Signed-off-by: Niklas Cassel Signed-off-by: Mark Brown Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/regulator/qcom_spmi-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -1774,7 +1774,7 @@ static int qcom_spmi_regulator_probe(str syscon = of_parse_phandle(node, "qcom,saw-reg", 0); saw_regmap = syscon_node_to_regmap(syscon); of_node_put(syscon); - if (IS_ERR(regmap)) + if (IS_ERR(saw_regmap)) dev_err(dev, "ERROR reading SAW regmap\n"); }