diff options
-rw-r--r-- | drivers/net/tulip/eeprom.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/tulip/eeprom.c b/drivers/net/tulip/eeprom.c index 6002e651b9ea..3031ed9c4a1a 100644 --- a/drivers/net/tulip/eeprom.c +++ b/drivers/net/tulip/eeprom.c | |||
@@ -120,8 +120,8 @@ static void __devinit tulip_build_fake_mediatable(struct tulip_private *tp) | |||
120 | 0x00, 0x06 /* ttm bit map */ | 120 | 0x00, 0x06 /* ttm bit map */ |
121 | }; | 121 | }; |
122 | 122 | ||
123 | tp->mtable = (struct mediatable *) | 123 | tp->mtable = kmalloc(sizeof(struct mediatable) + |
124 | kmalloc(sizeof(struct mediatable) + sizeof(struct medialeaf), GFP_KERNEL); | 124 | sizeof(struct medialeaf), GFP_KERNEL); |
125 | 125 | ||
126 | if (tp->mtable == NULL) | 126 | if (tp->mtable == NULL) |
127 | return; /* Horrible, impossible failure. */ | 127 | return; /* Horrible, impossible failure. */ |
@@ -227,9 +227,9 @@ subsequent_board: | |||
227 | return; | 227 | return; |
228 | } | 228 | } |
229 | 229 | ||
230 | mtable = (struct mediatable *) | 230 | mtable = kmalloc(sizeof(struct mediatable) + |
231 | kmalloc(sizeof(struct mediatable) + count*sizeof(struct medialeaf), | 231 | count * sizeof(struct medialeaf), |
232 | GFP_KERNEL); | 232 | GFP_KERNEL); |
233 | if (mtable == NULL) | 233 | if (mtable == NULL) |
234 | return; /* Horrible, impossible failure. */ | 234 | return; /* Horrible, impossible failure. */ |
235 | last_mediatable = tp->mtable = mtable; | 235 | last_mediatable = tp->mtable = mtable; |