Commit 9ceb4d87 authored by Alexey Simakov's avatar Alexey Simakov Committed by Greg Kroah-Hartman
Browse files

tg3: prevent use of uninitialized remote_adv and local_adv variables



[ Upstream commit 0c3f2e62 ]

Some execution paths that jump to the fiber_setup_done label
could leave the remote_adv and local_adv variables uninitialized
and then use it.

Initialize this variables at the point of definition to avoid this.

Fixes: 85730a63 ("tg3: Add SGMII phy support for 5719/5718 serdes")
Co-developed-by: default avatarAlexandr Sapozhnikov <alsp705@gmail.com>
Signed-off-by: default avatarAlexandr Sapozhnikov <alsp705@gmail.com>
Signed-off-by: default avatarAlexey Simakov <bigalex934@gmail.com>
Reviewed-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
Link: https://patch.msgid.link/20251014164736.5890-1-bigalex934@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 7e2f67b2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment