Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp176507imd; Wed, 31 Oct 2018 16:51:36 -0700 (PDT) X-Google-Smtp-Source: AJdET5caSsBuDkdniihX3Rfdp8qoEzKm+ps5KMVbiQ1Bn8L4nERiPgBjKO5YmoQvzR1Bex0/5ZGW X-Received: by 2002:a63:c00b:: with SMTP id h11mr1676952pgg.429.1541029896430; Wed, 31 Oct 2018 16:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541029896; cv=none; d=google.com; s=arc-20160816; b=FS6FQ2Dfjjys0IOBnMxta4eE2koTNXh1HcK5sIPW5pp7Jfq5eqfsEWJVwNEprDxTWI g4mFwQktR7M3DQXfgq+UY4dAWi3RB1x7AE/CcubuJt/TqL/Kd0Txk0y23uatscwgQFUh v5ne2CJcOWUWVTPLPs1Oa2HMsUxDC1jZrAgPpfllGdjKLeNXppZi+X+2KarHIL1I+S4P 2sRfC3koOzRjmCbZvn3atAgTXl+gKOws3BJoEaL7KZi7f5D1a6ekbtD7XH3zE+FpFkpg Zc4F+l1QLFn3YI6V0QoIQUvUMrUCtH79z9emRp/0yDjVVn35kA0I0Wdrak35Najo1WKg sAAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=hygETHlfsUQ/8poUFgnk2+dM0vpSzyw2c4BZgHt57pY=; b=Gh4fD23WGQtWxB4Ple+27vQUTStEx3isICy0rA6Y6PnWwyhINlmAsrACm6lRliqvUB wgOrJDmF5TAl1KUrVGPpJeiH9AKjunEAcYEzIuXqmDb4s294UVdpY0SukTstD7dVHjPE sgJ7WbMUSeeUy0+/UG2Q5Jzav/FOA4VUpDg1b9WIdust4pJQM4XNCxrjHamCiybeCsG7 MFSZxNV6hDSJXXP5Z4NQY1U/ruTo0Q5K/N8wlL1KPSM48c18Kv/GF2Yjj21NeeS5a7H9 IPDiHzQZrdOlzrn7Ry01u6DGGC8D8fohbT6AI6HuS4JP+Z4sDZ0Pz6hZQJUio3sCSXkL wvjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PeYZesws; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g38-v6si24681780pgl.248.2018.10.31.16.51.21; Wed, 31 Oct 2018 16:51:36 -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; dkim=pass header.i=@kernel.org header.s=default header.b=PeYZesws; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728249AbeKAIGl (ORCPT + 99 others); Thu, 1 Nov 2018 04:06:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:53766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728185AbeKAIGk (ORCPT ); Thu, 1 Nov 2018 04:06:40 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C78232082E; Wed, 31 Oct 2018 23:06:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541027190; bh=6j4QWqlfuxcnan2613gO4k8zZZO6NT3Wz+utt/o07LM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PeYZeswsVTLoBR2KL3JY5tpwmCIpiMEHWmyL/e0d2eoOpQoh+S9PJiWYzu7pG4exj 6GJMP75dt5NfIW+3V3TAcWqKwmja6iwUMOrJgyHcNe9Q3z/qdvOiKD2NhPJJd9j6kP z3Cxa3cTwLUbMVntJvcGBJ5vlRoQO7IqLIKOrz3M= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: YueHaibing , Linus Walleij , Sasha Levin Subject: [PATCH AUTOSEL 4.19 053/146] pinctrl: qcom: spmi-mpp: Fix err handling of pmic_mpp_set_mux Date: Wed, 31 Oct 2018 19:04:08 -0400 Message-Id: <20181031230541.28822-53-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031230541.28822-1-sashal@kernel.org> References: <20181031230541.28822-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: YueHaibing [ Upstream commit 69f8455f6cc78fa6cdf80d0105d7a748106271dc ] 'ret' should be returned while pmic_mpp_write_mode_ctl fails. Fixes: 0e948042c420 ("pinctrl: qcom: spmi-mpp: Implement support for sink mode") Signed-off-by: YueHaibing Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c index 6556dbeae65e..418bc40df7ca 100644 --- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c +++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c @@ -319,6 +319,8 @@ static int pmic_mpp_set_mux(struct pinctrl_dev *pctldev, unsigned function, pad->function = function; ret = pmic_mpp_write_mode_ctl(state, pad); + if (ret < 0) + return ret; val = pad->is_enabled << PMIC_MPP_REG_MASTER_EN_SHIFT; -- 2.17.1