Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3982372pxb; Tue, 25 Jan 2022 00:37:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJygh0T+8sBsOfmevoE/32MK6Vjp0a/HMDir9jFZ7OniT6PBhhFQwJ7QNNMEJ0A7aQp3jQXa X-Received: by 2002:a17:907:6e29:: with SMTP id sd41mr8167692ejc.276.1643099839197; Tue, 25 Jan 2022 00:37:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643099839; cv=none; d=google.com; s=arc-20160816; b=h2ETk+SDL+RM2nCPUsO4+klyQ8AzOm1lMh3AFVr8P6fl6xsR/5xSb8vEgCDDLQDkUr asYB59TanewBG7/f9zC5ztH1SC+G5owBdKOjI0LEMXRhu1kN1jYxbrP4NEe2a8EuSTl6 I713h4hUYq6TJTgTXo/nQI7/mQlMrX1Uj2ShzG3nEBtvHq627MVJetP0U6gFvFCt8inO JW3qwlZBPoQpVAKCcN8T8bGrd+WWUcsc+V61Tf2YrEd4IJwURYn5t+QYSaUSKajMRIqO 3REYCcLb68d/m8qZWCwHPC4ZSolVhg50ZNNpesuIIyqADqJCAdwp8VXuhCqWIgYla6oe rzhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Pr7t1MAQJqT71gQljxHfnlJRXTah9H6tkrldhXPgDaA=; b=xkVDkKr/uXoM0Bojztlfp75nhvnuj9bxgME+DBS+CSidlm0KkCICD/jnxHlQuY/mc6 U8pns7bHkxyQ0MCwyd1zbpEDnRErLnDMvYLMifgmxFxWNN2+yGOW2KQVn7Ul33NGucZ/ 8aMfdQDhhtVlORkWbY4fpUqOdI1GzCcBYLr5pPldRazE7LimPa11YWm7/+gX0neTHCmZ 9lCGwO10xpUX58fcxI5nQ3CqqQaRqkUZyDhpw4Pg1Ab4maJEv1yNTbbe38rDIWT7Zijv M3tYf9nBPxG8/ZgC3P+y14KO/XZQGW7DOyE3NLAecl9RqhLIEkyy+n3HKA/5hTfEfiC4 WjUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="fIxbrJG/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i10si9876967ejd.170.2022.01.25.00.36.54; Tue, 25 Jan 2022 00:37:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b="fIxbrJG/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1314033AbiAYCuM (ORCPT + 99 others); Mon, 24 Jan 2022 21:50:12 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:56624 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1445413AbiAXVDX (ORCPT ); Mon, 24 Jan 2022 16:03:23 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 70498B812A4; Mon, 24 Jan 2022 21:03:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA448C36AE9; Mon, 24 Jan 2022 21:03:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058199; bh=AMRrFw241ZNcJROd7kDoE1b/E1gc3bQHomw3ZEgExvU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fIxbrJG/gkN6iU5uB8kco8LitLSs9BPG9TzaIyGjVdfabo5pQHHhcHrU299Sxqfux 2Ln6lq6DlqdRBlHwrSycJgjYJLFJciS2rt6SvzXSvf5jEaPCcDUgUQTDU83c7DEKIV vrsN4ZoZn/qJujq2tTXEopc+XFSkHwk3rgOcAga0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Linus Walleij , Sasha Levin Subject: [PATCH 5.16 0211/1039] pinctrl: mediatek: add a check for error in mtk_pinconf_bias_get_rsel() Date: Mon, 24 Jan 2022 19:33:20 +0100 Message-Id: <20220124184132.426242390@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit 9f9d17c228c89e38ed612500126daf626270be9a ] All the other mtk_hw_get_value() calls have a check for "if (err)" so we can add one here as well. This silences a Smatch warning: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c:819 mtk_pinconf_bias_get_rsel() error: uninitialized symbol 'pd'. Fixes: fb34a9ae383a ("pinctrl: mediatek: support rsel feature") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20211127140836.GB24002@kili Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c index 53779822348da..e1ae3beb9f72b 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c @@ -815,6 +815,8 @@ static int mtk_pinconf_bias_get_rsel(struct mtk_pinctrl *hw, goto out; err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_PD, &pd); + if (err) + goto out; if (pu == 0 && pd == 0) { *pullup = 0; -- 2.34.1