Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3721016pxb; Mon, 24 Jan 2022 16:17:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJx36yiHPejLUl4Wfk8XBUMcx7DTD1XR/NSGYYEGieYKR5U/wkqa0/K+NpO3IV53xRQyNCGK X-Received: by 2002:a17:90a:c092:: with SMTP id o18mr799050pjs.172.1643069877919; Mon, 24 Jan 2022 16:17:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643069877; cv=none; d=google.com; s=arc-20160816; b=EG6Mw7+uL0Yw/Dj9Q+rur6GzUqw4ssiDjmmxjo9ooFupPkAgkiwn9CgwJAOfA3CHKg ctsISlV/p/QJP7bX44A/XxsjPCxmc7FJI0gErPXCs93YLa2eZIQBAev3J0HZcWNlZzaW 4ffC1dt7l/u6K2ZoRYd9ds5tW43YaSpRh5qbpA0SD6fI6UhRBoVYz0EHNd+5M1PYKNjC CBXSbttXsC4MX4WdTeYnVuF1AT3fqbmbDwl0nJObGssefZWyzm9loLTsViaxTAh9Yxh1 EvhkSMpVqZOPU1N5NXtFOka07un1dg2zpBCREg/y4QagbdO+qwJAXlOEtM+1MPHTPyux tVxw== 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=4xaxasxyKAx/Geg5wZxnHyP9hvNDENFPv+QcOzsJXP4=; b=Lma2h23vzt59qqRqXJFnzch8u+5Nhv4W+sJ7Vx6chwNUR/3vtMbWqbzUo8KB/ukCxk n9J1HYI9zE9Ww5JB2Eiga5GmsO4dSXDIi/41BNvrlAH1h2aCBfGrFF9eZwgYtLdM8MyE HfroLZ+r0xl1rU5BZDZR3gkrQKMjXqg0+yk/fBHaVMk9mWJ9z952pPboygFIRctRIj7B +Xeue9G4t+BcdKGrzp3HIeeB1rSceBbaNHAztpQevAg9W7muNgSXTiJdd0D0fTqTYnZ/ RUUNyu120Z1/XViHl/UWefh5R4tuBnnWST8RVdpB/IfRvjOflsoJRL24xhKyRq+HKHe7 IMaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KdW8qaJu; 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 d3si8676103plg.300.2022.01.24.16.17.45; Mon, 24 Jan 2022 16:17:57 -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=KdW8qaJu; 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 S2372850AbiAYAMi (ORCPT + 99 others); Mon, 24 Jan 2022 19:12:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376878AbiAXWjp (ORCPT ); Mon, 24 Jan 2022 17:39:45 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12318C055A82; Mon, 24 Jan 2022 13:03:17 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id A759D6135E; Mon, 24 Jan 2022 21:03:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65974C340E5; Mon, 24 Jan 2022 21:03:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058196; bh=2kVKJqHtcxVJW0NOQq1o96/VtVRgd9Gc0cgLyrd3S30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KdW8qaJufB0i97aLVsNFLt2RGLDHb6GR+7OnVbCsWSqWN6ggKs2tcCUe0rnpaY1SW rlGRJdH49Yep9cyA1jpObyJ6xzSASFhkspWKiPfgG1oj8mqtoaNIPnZvgXxPAj0Y9A nhYVI7GqJGJs71el0dYpdyH/+fE9c8iQP7T86/Oo= 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 0210/1039] pinctrl: mediatek: uninitialized variable in mtk_pctrl_show_one_pin() Date: Mon, 24 Jan 2022 19:33:19 +0100 Message-Id: <20220124184132.386134617@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 67bbbcb49b968a93251de7b23616d5aff5d3a726 ] The "try_all_type" variable is not set if (hw->soc->pull_type) is false leading to the following Smatch warning: drivers/pinctrl/mediatek/pinctrl-paris.c:599 mtk_pctrl_show_one_pin() error: uninitialized symbol 'try_all_type'. Fixes: fb34a9ae383a ("pinctrl: mediatek: support rsel feature") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20211127140750.GA24002@kili Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/mediatek/pinctrl-paris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c index d4e02c5d74a89..4c6f6d967b18a 100644 --- a/drivers/pinctrl/mediatek/pinctrl-paris.c +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c @@ -581,7 +581,7 @@ ssize_t mtk_pctrl_show_one_pin(struct mtk_pinctrl *hw, { int pinmux, pullup, pullen, len = 0, r1 = -1, r0 = -1, rsel = -1; const struct mtk_pin_desc *desc; - u32 try_all_type; + u32 try_all_type = 0; if (gpio >= hw->soc->npins) return -EINVAL; -- 2.34.1