net/phy: Fix phy_connect() for phy addr 0
Fix 'mask' calculation in phy_connect() for phy addr '0'. 'mask' is getting set to '0xffffffff' for phy addr '0' in phy_connect() whereas expected value is '0'. Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com> Reported-by: tetsu-aoki via github Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
a6ab4b5470
commit
1f60789602
@ -997,7 +997,7 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr,
|
||||
#endif
|
||||
{
|
||||
struct phy_device *phydev = NULL;
|
||||
uint mask = (addr > 0) ? (1 << addr) : 0xffffffff;
|
||||
uint mask = (addr >= 0) ? (1 << addr) : 0xffffffff;
|
||||
|
||||
#ifdef CONFIG_PHY_FIXED
|
||||
phydev = phy_connect_fixed(bus, dev, interface);
|
||||
|
Loading…
Reference in New Issue
Block a user