mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
net: stmmac: failure to probe without MAC interface specified
Alexander Stein reports that commit a014c35556
("net: stmmac: clarify
difference between "interface" and "phy_interface"") caused breakage,
because plat->mac_interface will never be negative. Fix this by using
the "rc" temporary variable in stmmac_probe_config_dt().
Reported-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/E1qayn0-006Q8J-GE@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
e4da8c7897
commit
b5947239bf
1 changed files with 2 additions and 3 deletions
|
@ -419,9 +419,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)
|
|||
return ERR_PTR(phy_mode);
|
||||
|
||||
plat->phy_interface = phy_mode;
|
||||
plat->mac_interface = stmmac_of_get_mac_mode(np);
|
||||
if (plat->mac_interface < 0)
|
||||
plat->mac_interface = plat->phy_interface;
|
||||
rc = stmmac_of_get_mac_mode(np);
|
||||
plat->mac_interface = rc < 0 ? plat->phy_interface : rc;
|
||||
|
||||
/* Some wrapper drivers still rely on phy_node. Let's save it while
|
||||
* they are not converted to phylink. */
|
||||
|
|
Loading…
Add table
Reference in a new issue