Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3434884imu; Sun, 11 Nov 2018 15:02:41 -0800 (PST) X-Google-Smtp-Source: AJdET5e1ovvvryurAFveMF/tTyyxeBxG3Jfa1zbdbJh9pSqmdJBco1WIvLgZlcH96fNEleb7t6GX X-Received: by 2002:a17:902:59c8:: with SMTP id d8mr2128938plj.116.1541977360936; Sun, 11 Nov 2018 15:02:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977360; cv=none; d=google.com; s=arc-20160816; b=HaSnJLEu0BDxa2PvSG0Wc/WPxPNaDtLrSsKwOn94LT5IHc/Q/LdlLrx/emT1v4m+HZ LwZzxNLQDFcdiZ+5DwsXHx+n1XOFlVjKBj0RTrLQnBaTCfRtARUKTFwwfUqUyJKufjoO AQncNUKpC+l2RWSw8GMUehNPNf5TWYrFWxi+xMoyqIMJUP/Lz9bCRcesidiA7q8dIDVm +x/m0jlsJYuFBypuQusRvbPsxQCM6b10jGTvc9e14QyUpFGvOwTZdSEL23S5YnyPDXEt ltfXepPpQXBMvkBrN0RVdvb19rd59PAKv0I+S+t1ySbdRrxvHrJ5OcOV7A16amlqq42b E5rA== 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:dkim-signature; bh=0BB1RVxat3lREZ/a7EhiHOkfcU6TApHzJdQbfjYjaIc=; b=0ntCK2Lylk8Ruja1bJebfhvAMAVfF6ejInhAe6A6GHiL5gereqcBf/P88OJV+OmAIO zf1Kp7RhVfssNWbu6B4GKF4/0CJX1xKZiu889pQBRiB278wNydt8QvU/C1JFK9bMYbrK ZxCDlyjJMwuEOekOjT4BKiL4UwBTLPh4b/vAf+5Z7Ey9fsR6dfqtdHe1FDVRo0TIj6sD 9c0Di3kBDB9j4T6aplz+BAJEkCwAa3bT/zw8yV228mtdf1dc7BTkXD+OkUHpeABZqQdd bONYvHkKtbRnIJbyrEippuF1z1rXKUmb+L1PtdB5/M15I5xkPDdV0f1q4gQHqznlM18B /pTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BU9j8IUn; 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 e20-v6si13323232pgv.502.2018.11.11.15.02.25; Sun, 11 Nov 2018 15:02:40 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BU9j8IUn; 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 S2390790AbeKLIu6 (ORCPT + 99 others); Mon, 12 Nov 2018 03:50:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:52752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390697AbeKLIWc (ORCPT ); Mon, 12 Nov 2018 03:22:32 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B10E721780; Sun, 11 Nov 2018 22:32:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975555; bh=j1SUgGqPxOgON1rIfYz7lrCj+F3XOR0RGKfhXacjvnI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BU9j8IUnynnVb85xwzJFg2Id8Do9u1a4t5wwsEVEagcsE8G4y3UVWZdDFB+NbFxX2 Z9J7KttyTiOeR2mDVertw9gtR0BSxX515OohDNjj2qkZ7KfmQDwX/nrLBnPPfI/Xf9 G0x4fuOGjzZ2awXF0kAjATY1ZU47KrvI2hwH+r4c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, YueHaibing , Linus Walleij , Sasha Levin Subject: [PATCH 4.14 062/222] pinctrl: qcom: spmi-mpp: Fix err handling of pmic_mpp_set_mux Date: Sun, 11 Nov 2018 14:22:39 -0800 Message-Id: <20181111221653.532445482@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@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.14-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 2 ++ 1 file changed, 2 insertions(+) --- 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 pinct 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;