Commit 655aa393 authored by Rickard Strandqvist's avatar Rickard Strandqvist Committed by David S. Miller

net: ethernet: toshiba: ps3_gelic_net.c: Cleaning up a check on a memory allocation

A check on a memory allocation is checked incorrectly.

This was partly found using a static code analysis program called cppcheck.
Signed-off-by: default avatarRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Acked-by: default avatarGeoff Levand <geoff@infradead.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a25aafaa
......@@ -1561,7 +1561,7 @@ static struct gelic_card *gelic_alloc_card_net(struct net_device **netdev)
* alloc netdev
*/
*netdev = alloc_etherdev(sizeof(struct gelic_port));
if (!netdev) {
if (!*netdev) {
kfree(card->unalign);
return NULL;
}
......
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