Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13786
b: refs/heads/master
c: 1064e94
h: refs/heads/master
v: v3
  • Loading branch information
John W. Linville authored and David S. Miller committed Nov 10, 2005
1 parent 69f3815 commit b48fb3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b6cbc3b6fe588c0ea1341d10413e12c2a96a6032
refs/heads/master: 1064e944d03eb7a72c0fa11236d5e69cfd877a71
12 changes: 2 additions & 10 deletions trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -4800,11 +4800,7 @@ bnx2_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
struct bnx2 *bp = dev->priv;
int rc;

if (eeprom->offset > bp->flash_info->total_size)
return -EINVAL;

if ((eeprom->offset + eeprom->len) > bp->flash_info->total_size)
eeprom->len = bp->flash_info->total_size - eeprom->offset;
/* parameters already validated in ethtool_get_eeprom */

rc = bnx2_nvram_read(bp, eeprom->offset, eebuf, eeprom->len);

Expand All @@ -4818,11 +4814,7 @@ bnx2_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
struct bnx2 *bp = dev->priv;
int rc;

if (eeprom->offset > bp->flash_info->total_size)
return -EINVAL;

if ((eeprom->offset + eeprom->len) > bp->flash_info->total_size)
eeprom->len = bp->flash_info->total_size - eeprom->offset;
/* parameters already validated in ethtool_set_eeprom */

rc = bnx2_nvram_write(bp, eeprom->offset, eebuf, eeprom->len);

Expand Down

0 comments on commit b48fb3b

Please sign in to comment.