Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3864232pxb; Tue, 17 Nov 2020 05:42:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJygRGuT5PsFeRtoiBK3NrJuK6dFjKfYkt8QFQPhCUVu1ASRT8o8hnEigkZPjL8GqeTBJD46 X-Received: by 2002:a17:906:35da:: with SMTP id p26mr19554576ejb.256.1605620524814; Tue, 17 Nov 2020 05:42:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605620524; cv=none; d=google.com; s=arc-20160816; b=Vhrlyd25NhNFRtg5vOCKo7rhjIeSRsPIdtmxGnL/ylrVni/YLKnKd61ZN9WtTjTaI+ gmGcHa/d9oTIfXGW32/9do+sTKoK/54HicSXnCchg/rgw+CaGxIqre1yZ3J0Q0saeJFM Gu6BZwHpqGJe6BLu+D2m0t49mHqL/hEQ7aEtcF7XjvkhSHAlQiBs+ulMnoYS0lOCxv+T xyTCt1QXqCPbetb+3eO/S+5NX32oDj7c/Q01hsE7wYXrL/76uLRRDrnhYSJrubc5vDy3 GADVwqI11IttOLpqHbOGMzn4PBW5KbcHf+M+HMM6Ui6eh6DWlkzmbKU7dNPm7RgRsv02 qEuQ== 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=xD1Yl/mGK5OxH/A31+2+lT3ta1nWaHWT7qMY6zWXSd4=; b=mLncCkZJa3ZCp6vsl3xmIeTZ7lhs4XjfKO6iD5RcTt0rl7w425mLvOjmXGJ8gqp5SL W7UTry96fN6sL1fstq3P3YdSe1xhqiMvvHDerjSHSdGUYKnJGwpnkD6AMl1rgaugNLOM OIf80+UQADaYj0YRR57UXCQdJc92y74RX8A/2AHrhEhhkKG2YM+AqlecDdNVk4e94cnK yt0NLCsK78CddP5VZRZ+hHmM8kEx/67HorXMWjhd5Bb2Np3nBfwM3JrG2bHDql9Rer3K dfNa8/5STmKA/43JLfg25UpM6fEKQ3a7+ZFZ4n1d7Mp07F7jdzzoCh61ZelCHf8DQ2Qq 1kwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="FWWXtsF/"; 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=fail (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 bo5si14067177ejb.102.2020.11.17.05.41.41; Tue, 17 Nov 2020 05:42:04 -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=@kernel.org header.s=default header.b="FWWXtsF/"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733058AbgKQNiU (ORCPT + 99 others); Tue, 17 Nov 2020 08:38:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:49418 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732279AbgKQNiN (ORCPT ); Tue, 17 Nov 2020 08:38:13 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 AD67220870; Tue, 17 Nov 2020 13:38:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605620292; bh=6iOxNDJRpZRddC+e2/LAvY92XRl6JIkcy/8/Q7+pMU0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FWWXtsF/RUmssVSj+9w49gIo2cOZpMeh8WTqnl/w0JT9Fj1bSP79h1XYndclxvlQP pEvxFO6hHYpVcAUFl/8fzhQuq5eSMS0PInZND1G3m6ox0mT6hBFLz5OIa/8k0FsG4O FraLSiPPLuXhr/3bzryERwL0Le4Mi9hP7xm5oPag= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Sven Van Asbroeck , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.9 171/255] lan743x: fix use of uninitialized variable Date: Tue, 17 Nov 2020 14:05:11 +0100 Message-Id: <20201117122147.256254115@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122138.925150709@linuxfoundation.org> References: <20201117122138.925150709@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: Sven Van Asbroeck [ Upstream commit edbc21113bde13ca3d06eec24b621b1f628583dd ] When no devicetree is present, the driver will use an uninitialized variable. Fix by initializing this variable. Fixes: 902a66e08cea ("lan743x: correctly handle chips with internal PHY") Reported-by: kernel test robot Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20201112152513.1941-1-TheSven73@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/microchip/lan743x_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c index 6c25c7c8b7cf8..bc368136bccc6 100644 --- a/drivers/net/ethernet/microchip/lan743x_main.c +++ b/drivers/net/ethernet/microchip/lan743x_main.c @@ -1015,8 +1015,8 @@ static void lan743x_phy_close(struct lan743x_adapter *adapter) static int lan743x_phy_open(struct lan743x_adapter *adapter) { struct lan743x_phy *phy = &adapter->phy; + struct phy_device *phydev = NULL; struct device_node *phynode; - struct phy_device *phydev; struct net_device *netdev; int ret = -EIO; -- 2.27.0