Commit d348446b authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

smsc95xx: signedness bug in get_regs()

"retval" has to be a signed integer for the error handling to work.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 064bff1c
...@@ -589,7 +589,8 @@ smsc95xx_ethtool_getregs(struct net_device *netdev, struct ethtool_regs *regs, ...@@ -589,7 +589,8 @@ smsc95xx_ethtool_getregs(struct net_device *netdev, struct ethtool_regs *regs,
void *buf) void *buf)
{ {
struct usbnet *dev = netdev_priv(netdev); struct usbnet *dev = netdev_priv(netdev);
unsigned int i, j, retval; unsigned int i, j;
int retval;
u32 *data = buf; u32 *data = buf;
retval = smsc95xx_read_reg(dev, ID_REV, &regs->version); retval = smsc95xx_read_reg(dev, ID_REV, &regs->version);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment