Skip to content

Commit d325c34

Browse files
Ganliberdavem330
authored andcommitted
net: amd: Fix link leak when verifying config failed
After failing to verify configuration, it returns directly without releasing link, which may cause memory leak. Paolo Abeni thinks that the whole code of this driver is quite "suboptimal" and looks unmainatained since at least ~15y, so he suggests that we could simply remove the whole driver, please take it into consideration. Simon Horman suggests that the fix label should be set to "Linux-2.6.12-rc2" considering that the problem has existed since the driver was introduced and the commit above doesn't seem to exist in net/net-next. Fixes: 1da177e ("Linux-2.6.12-rc2") Signed-off-by: Gan Gecen <[email protected]> Reviewed-by: Dongliang Mu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d913d32 commit d325c34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/amd/nmclan_cs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ static int nmclan_config(struct pcmcia_device *link)
651651
} else {
652652
pr_notice("mace id not found: %x %x should be 0x40 0x?9\n",
653653
sig[0], sig[1]);
654-
return -ENODEV;
654+
goto failed;
655655
}
656656
}
657657

0 commit comments

Comments
 (0)