diff options
Diffstat (limited to 'drivers/net/ksz884x.c')
-rw-r--r-- | drivers/net/ksz884x.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ksz884x.c b/drivers/net/ksz884x.c index 0f59099ee72f..0606a1f359fb 100644 --- a/drivers/net/ksz884x.c +++ b/drivers/net/ksz884x.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/if_vlan.h> | 30 | #include <linux/if_vlan.h> |
31 | #include <linux/crc32.h> | 31 | #include <linux/crc32.h> |
32 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | 35 | ||
35 | /* DMA Registers */ | 36 | /* DMA Registers */ |
@@ -6322,7 +6323,7 @@ static int netdev_set_eeprom(struct net_device *dev, | |||
6322 | int len; | 6323 | int len; |
6323 | 6324 | ||
6324 | if (eeprom->magic != EEPROM_MAGIC) | 6325 | if (eeprom->magic != EEPROM_MAGIC) |
6325 | return 1; | 6326 | return -EINVAL; |
6326 | 6327 | ||
6327 | len = (eeprom->offset + eeprom->len + 1) / 2; | 6328 | len = (eeprom->offset + eeprom->len + 1) / 2; |
6328 | for (i = eeprom->offset / 2; i < len; i++) | 6329 | for (i = eeprom->offset / 2; i < len; i++) |