Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6ED6C6FA99 for ; Sun, 12 Mar 2023 15:51:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229800AbjCLPvQ (ORCPT ); Sun, 12 Mar 2023 11:51:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbjCLPvO (ORCPT ); Sun, 12 Mar 2023 11:51:14 -0400 Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [95.163.41.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B10E38677 for ; Sun, 12 Mar 2023 08:51:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail4; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From:From:Subject:Content-Type:Content-Transfer-Encoding:To:Cc; bh=UdqRoZ8rmjxnZ17LE+zHB0x/1aCpMhfftcPoVHT7pgM=; t=1678636272;x=1678726272; b=jV6Pdj0myvurlnpJx/VKbsGUPoEo+B8Cy0wSWRQ4n8FdBSkKz58t4jn1Xf1DnDc8MU3sHy0HWUohseavoNrlG9ltVLVswKRqS7OATAkvd9a7Mpgo5Wvas3xxetvSqVRMBrpyRsAZnmBQGxBtzDZiLUDssvED4FFEhNkEGCj8tzxTvtJm4ZC7nRe0MPwHPIcKga0IZ7mzc7hIGACYuTppeEtwLliZ1aRz9XOPzC8qta8Gip284wVkbCGAdOJnsZtYizPpn006UgKnLWykScXXQ1isJOl/dDl1BqaGICXnWwH/xcyTtBJhBaMJF08FfAsUTIZUhFNpahuOzp47UznccQ==; Received: by smtp39.i.mail.ru with esmtpa (envelope-from ) id 1pbNyW-00FuqP-IJ; Sun, 12 Mar 2023 18:51:09 +0300 From: Danila Chernetsov To: Andrew Lunn Cc: Danila Chernetsov , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: [PATCH] net: dsa: vsc73xxx: Fix uninitalized 'val' in vsc73xx_adjust_link Date: Sun, 12 Mar 2023 15:50:08 +0000 Message-Id: <20230312155008.7830-1-listdansp@mail.ru> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: smtp39.i.mail.ru; auth=pass smtp.auth=listdansp@mail.ru smtp.mailfrom=listdansp@mail.ru X-Mailru-Src: smtp X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9BCEC41593EBD83573328AE13154FE908333A02E638E8A8D8182A05F538085040BA131452E98B02D3A2D43525F027362765A87E3F7053FFD739B9C8F1741A93F3 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE72F22E6DC541F75D9EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006374D0D183F14C070BA8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8D22814C81919C2625231FA6CA7EE31796F9789CCF6C18C3F8528715B7D10C86878DA827A17800CE78A80DFD3A0D2C7BC9FA2833FD35BB23D9E625A9149C048EE0AC5B80A05675ACDF04B652EEC242312D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BF80095D1ED7F4578A471835C12D1D977C4224003CC836476EB9C4185024447017B076A6E789B0E975F5C1EE8F4F765FC5BFAD0E70065EE5E3AA81AA40904B5D9CF19DD082D7633A078D18283394535A93AA81AA40904B5D98AA50765F790063741BC3E871AF2F68EEC76A7562686271ED91E3A1F190DE8FD2E808ACE2090B5E14AD6D5ED66289B5278DA827A17800CE76631511D42670FFE2EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE7CEB265472FA452CE731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A575C40842A8D7597B3C13B7181B787DE4B4445C2A65D9C08F4EAF44D9B582CE87C8A4C02DF684249C2E763F503762DF508DC63EAE0DBA7CFC X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3475FE4AA98865E235E0F17735419505755771C14B7AF3001C2E5A6D7E85000C7E9C8413E86C1BEE231D7E09C32AA3244C2471231B541CB5E68D9BF48984D7CF61B4DF56057A86259FC2E5D8217768D59A X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojN3wBDQf4j7NXr72x5a6kPw== X-Mailru-Sender: 4CE1109FD677D2770147F6A9E21DCA7B96B4B291D31EA920205419AD0297E0A905EDA15CF47320D67E3C9C7AF06D9E7B78274A4A9E9E44FD3C3897ABF9FF211DE8284E426C7B2D9A5FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using uninitialized variable after calls vsc73xx_read without error checking may cause incorrect driver behavior. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 95711cd5f0b4 ("net: dsa: vsc73xx: Split vsc73xx driver") Signed-off-by: Danila Chernetsov --- drivers/net/dsa/vitesse-vsc73xx-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/vitesse-vsc73xx-core.c b/drivers/net/dsa/vitesse-vsc73xx-core.c index ae55167ce0a6..729005d6cb7e 100644 --- a/drivers/net/dsa/vitesse-vsc73xx-core.c +++ b/drivers/net/dsa/vitesse-vsc73xx-core.c @@ -758,7 +758,7 @@ static void vsc73xx_adjust_link(struct dsa_switch *ds, int port, struct phy_device *phydev) { struct vsc73xx *vsc = ds->priv; - u32 val; + u32 val = 0; /* Special handling of the CPU-facing port */ if (port == CPU_PORT) { -- 2.25.1