drivers/net/tulip/eeprom.c: Remove unnecessary kmalloc casts
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
de47f07264
commit
589be65005
@@ -120,8 +120,8 @@ static void __devinit tulip_build_fake_mediatable(struct tulip_private *tp)
|
|||||||
0x00, 0x06 /* ttm bit map */
|
0x00, 0x06 /* ttm bit map */
|
||||||
};
|
};
|
||||||
|
|
||||||
tp->mtable = (struct mediatable *)
|
tp->mtable = kmalloc(sizeof(struct mediatable) +
|
||||||
kmalloc(sizeof(struct mediatable) + sizeof(struct medialeaf), GFP_KERNEL);
|
sizeof(struct medialeaf), GFP_KERNEL);
|
||||||
|
|
||||||
if (tp->mtable == NULL)
|
if (tp->mtable == NULL)
|
||||||
return; /* Horrible, impossible failure. */
|
return; /* Horrible, impossible failure. */
|
||||||
@@ -227,9 +227,9 @@ subsequent_board:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mtable = (struct mediatable *)
|
mtable = kmalloc(sizeof(struct mediatable) +
|
||||||
kmalloc(sizeof(struct mediatable) + count*sizeof(struct medialeaf),
|
count * sizeof(struct medialeaf),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (mtable == NULL)
|
if (mtable == NULL)
|
||||||
return; /* Horrible, impossible failure. */
|
return; /* Horrible, impossible failure. */
|
||||||
last_mediatable = tp->mtable = mtable;
|
last_mediatable = tp->mtable = mtable;
|
||||||
|
Reference in New Issue
Block a user