diff options
author | Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> | 2014-06-07 06:22:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-11 03:13:16 -0400 |
commit | 655aa393063b0cca03d1c4d1d2971b9b9770525b (patch) | |
tree | ad240ed72dc0bbb69c7181e93f48e3f38c48fb72 | |
parent | a25aafaa5ba8ab267677615f821cb5d0303521e5 (diff) |
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: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Acked-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/toshiba/ps3_gelic_net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_net.c b/drivers/net/ethernet/toshiba/ps3_gelic_net.c index d899d0072ae0..bb7992804664 100644 --- a/drivers/net/ethernet/toshiba/ps3_gelic_net.c +++ b/drivers/net/ethernet/toshiba/ps3_gelic_net.c | |||
@@ -1561,7 +1561,7 @@ static struct gelic_card *gelic_alloc_card_net(struct net_device **netdev) | |||
1561 | * alloc netdev | 1561 | * alloc netdev |
1562 | */ | 1562 | */ |
1563 | *netdev = alloc_etherdev(sizeof(struct gelic_port)); | 1563 | *netdev = alloc_etherdev(sizeof(struct gelic_port)); |
1564 | if (!netdev) { | 1564 | if (!*netdev) { |
1565 | kfree(card->unalign); | 1565 | kfree(card->unalign); |
1566 | return NULL; | 1566 | return NULL; |
1567 | } | 1567 | } |