Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287475
b: refs/heads/master
c: 786f528
h: refs/heads/master
i:
  287473: f5a5342
  287471: 3ebbb00
v: v3
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Feb 1, 2012
1 parent 17aeddf commit e2d72b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 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: efcdbf24fd5daa88060869e51ed49f68b7ac8708
refs/heads/master: 786f528119722f564a22ad953411374e06116333
6 changes: 1 addition & 5 deletions trunk/drivers/net/ethernet/emulex/benet/be_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,12 +716,8 @@ static int
be_do_flash(struct net_device *netdev, struct ethtool_flash *efl)
{
struct be_adapter *adapter = netdev_priv(netdev);
char file_name[ETHTOOL_FLASH_MAX_FILENAME];

file_name[ETHTOOL_FLASH_MAX_FILENAME - 1] = 0;
strcpy(file_name, efl->data);

return be_load_fw(adapter, file_name);
return be_load_fw(adapter, efl->data);
}

static int
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/core/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,8 @@ static noinline_for_stack int ethtool_flash_device(struct net_device *dev,
if (!dev->ethtool_ops->flash_device)
return -EOPNOTSUPP;

efl.data[ETHTOOL_FLASH_MAX_FILENAME - 1] = 0;

return dev->ethtool_ops->flash_device(dev, &efl);
}

Expand Down

0 comments on commit e2d72b1

Please sign in to comment.