Skip to content
Commit 0cc8bddb authored by Peter Geis's avatar Peter Geis Committed by Jakub Kicinski
Browse files

net: phy: abort loading yt8511 driver in unsupported modes



While investigating the clang `ge` uninitialized variable report, it was
discovered the default switch would have unintended consequences. Due to
the switch to __phy_modify, the driver would modify the ID values in the
default scenario.

Fix this by promoting the interface mode switch and aborting when the
mode is not a supported RGMII mode.

This prevents the `ge` and `fe` variables from ever being used
uninitialized.

Fixes: 48e8c6f1 ("net: phy: add driver for Motorcomm yt8511 phy")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarPeter Geis <pgwipeout@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 546d6bad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment