From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0139F613F for ; Wed, 14 Jun 2023 13:49:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83FBDC433C8; Wed, 14 Jun 2023 13:49:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686750555; bh=K8wYi/yoT8s5R17p76hSh/ZFx53ah7YMr+dtJL5G/tY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M6Wqw5L7F/ncfbdX1K+o3SbPkqW1ek6AgMM1Ytm8D3IPkaskthW9jMz3WmIERLjzx Wm7Waze4XDGkMBUU/Y5nQZhhTM4BZmy6F20S6x+60wVxUpWXJOMd/D5ESCatMsUbeg mcmrUb1Mlu8PY5Xi0T5HL7Ve3s+E+WWTOuQdNYcDG4bJYUH5zWV0yyQ0vDaAm+G79M 6rmhzR3FHZXp3eM6ph22wmR2UyyAKaymh1fmWcWqUlmAeQEJLbZKiT3kMap5Jct2fY ZOqY5+OXaWS7JPdYD4OgX3Rkz7mHlhPMMir1CF3fM9vghCiduD5ISHQyg239U++BF/ XY8IZbYJ94t6A== Date: Wed, 14 Jun 2023 14:49:09 +0100 From: Lee Jones To: Dan Carpenter Cc: Christian Marangi , Florian Fainelli , Vladimir Oltean , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Pavel Machek , netdev@vger.kernel.org, Andrew Lunn , "David S. Miller" , linux-leds@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH v2 net-next resend] leds: trigger: netdev: uninitialized variable in netdev_trig_activate() Message-ID: <20230614134909.GT3635807@google.com> References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, 14 Jun 2023, Dan Carpenter wrote: > The qca8k_cled_hw_control_get() function which implements ->hw_control_get > sets the appropriate bits but does not clear them. This leads to an > uninitialized variable bug. Fix this by setting mode to zero at the > start. > > Fixes: e0256648c831 ("net: dsa: qca8k: implement hw_control ops") > Signed-off-by: Dan Carpenter > Reviewed-by: Andrew Lunn > --- > Resending because this actually goes through net-next and not the led > subsystem. > > v2: In the original patch I fixed qca8k_cled_hw_control_get() instead > so that patch went to netdev instead of to the led subsystem. > https://lore.kernel.org/all/5dff3719-f827-45b6-a0d3-a00efed1099b@moroto.mountain/ > Fixing it here is a more reliable way to do it. > > drivers/leds/trigger/ledtrig-netdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Lee Jones -- Lee Jones [李琼斯]