mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-03 04:16:39 +07:00
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>
This commit is contained in:
parent
a25aafaa5b
commit
655aa39306
@ -1561,7 +1561,7 @@ static struct gelic_card *gelic_alloc_card_net(struct net_device **netdev)
|
|||||||
* alloc netdev
|
* alloc netdev
|
||||||
*/
|
*/
|
||||||
*netdev = alloc_etherdev(sizeof(struct gelic_port));
|
*netdev = alloc_etherdev(sizeof(struct gelic_port));
|
||||||
if (!netdev) {
|
if (!*netdev) {
|
||||||
kfree(card->unalign);
|
kfree(card->unalign);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user