aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/ethtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000e/ethtool.c')
-rw-r--r--drivers/net/e1000e/ethtool.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
index e21c9e0f3738..5ed8e13d5fed 100644
--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -529,6 +529,9 @@ static int e1000_set_eeprom(struct net_device *netdev,
529 if (eeprom->magic != (adapter->pdev->vendor | (adapter->pdev->device << 16))) 529 if (eeprom->magic != (adapter->pdev->vendor | (adapter->pdev->device << 16)))
530 return -EFAULT; 530 return -EFAULT;
531 531
532 if (adapter->flags & FLAG_READ_ONLY_NVM)
533 return -EINVAL;
534
532 max_len = hw->nvm.word_size * 2; 535 max_len = hw->nvm.word_size * 2;
533 536
534 first_word = eeprom->offset >> 1; 537 first_word = eeprom->offset >> 1;