mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-27 22:56:49 +08:00
miiphy: miiphyutil.c: fix compile warning
Fix warning introduced while recent PHY Lib changes: miiphyutil.c: In function 'miiphy_read': miiphyutil.c:304: warning: comparison is always false due to limited range of data type Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Andy Fleming <afleming@freescale.com>
This commit is contained in:
parent
aeabdeb7a3
commit
d67d5d529a
@ -294,14 +294,18 @@ int miiphy_read(const char *devname, unsigned char addr, unsigned char reg,
|
|||||||
unsigned short *value)
|
unsigned short *value)
|
||||||
{
|
{
|
||||||
struct mii_dev *bus;
|
struct mii_dev *bus;
|
||||||
|
int ret;
|
||||||
|
|
||||||
bus = miiphy_get_active_dev(devname);
|
bus = miiphy_get_active_dev(devname);
|
||||||
if (bus)
|
if (!bus)
|
||||||
*value = bus->read(bus, addr, MDIO_DEVAD_NONE, reg);
|
|
||||||
else
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return (*value < 0) ? 1 : 0;
|
ret = bus->read(bus, addr, MDIO_DEVAD_NONE, reg);
|
||||||
|
if (ret < 0)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
*value = (unsigned short)ret;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user