mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-01-07 01:32:11 +01:00
net: dwc_eth_xgmac_socfpga: Remove always true test
In dwxgmac_of_get_mac_mode there is a test for mac_mode which will return if false. After this point mac_mode is guaranteed to be true so there is no need to test for this. Remove that test. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
This commit is contained in:
parent
7701cc3415
commit
28c06d67cf
@ -39,11 +39,9 @@ phy_interface_t dwxgmac_of_get_mac_mode(struct udevice *dev)
|
||||
if (!mac_mode)
|
||||
return PHY_INTERFACE_MODE_NA;
|
||||
|
||||
if (mac_mode) {
|
||||
for (i = 0; i < PHY_INTERFACE_MODE_MAX; i++) {
|
||||
if (!strcmp(mac_mode, phy_interface_strings[i]))
|
||||
return i;
|
||||
}
|
||||
for (i = 0; i < PHY_INTERFACE_MODE_MAX; i++) {
|
||||
if (!strcmp(mac_mode, phy_interface_strings[i]))
|
||||
return i;
|
||||
}
|
||||
return PHY_INTERFACE_MODE_NA;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user