Commit 8fee88bd authored by Jeff Garzik's avatar Jeff Garzik

e1000 net driver small cleanup:

return EOPNOTSUPP if no eeprom present, in ETHTOOL_SEEPROM ioctl
parent 2fb65448
...@@ -240,11 +240,12 @@ e1000_ethtool_seeprom(struct e1000_adapter *adapter, ...@@ -240,11 +240,12 @@ e1000_ethtool_seeprom(struct e1000_adapter *adapter,
int i, max_len, first_word, last_word; int i, max_len, first_word, last_word;
void *ptr; void *ptr;
if(eeprom->len == 0)
return -EOPNOTSUPP;
if(eeprom->magic != (hw->vendor_id | (hw->device_id << 16))) if(eeprom->magic != (hw->vendor_id | (hw->device_id << 16)))
return -EFAULT; return -EFAULT;
if(eeprom->len == 0) return 0;
max_len = e1000_eeprom_size(hw); max_len = e1000_eeprom_size(hw);
if((eeprom->offset + eeprom->len) > max_len) if((eeprom->offset + eeprom->len) > max_len)
......
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