net: stmmac: failure to probe without MAC interface specified
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 29 Aug 2023 13:29:50 +0000 (14:29 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 31 Aug 2023 01:32:19 +0000 (18:32 -0700)
commitb5947239bfa666afd05ce0fc02b9c41ec8209e88
treed894def95ab431101edfdaed08c69220a4ad1d9a
parente4da8c78973c1e307c0431e0b99a969ffb8aa3f1
net: stmmac: failure to probe without MAC interface specified

Alexander Stein reports that commit a014c35556b9 ("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>
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c