Skip to content

Commit d7dd6ec

Browse files
tititiou36kuba-moo
authored andcommitted
net: bgmac: Fix an erroneous kfree() in bgmac_remove()
'bgmac' is part of a managed resource allocated with bgmac_alloc(). It should not be freed explicitly. Remove the erroneous kfree() from the .remove() function. Fixes: 34a5102 ("net: bgmac: allocate struct bgmac just once & don't copy it") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/a026153108dd21239036a032b95c25b5cece253b.1655153616.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 4b7a632 commit d7dd6ec

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

drivers/net/ethernet/broadcom/bgmac-bcma.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ static void bgmac_remove(struct bcma_device *core)
332332
bcma_mdio_mii_unregister(bgmac->mii_bus);
333333
bgmac_enet_remove(bgmac);
334334
bcma_set_drvdata(core, NULL);
335-
kfree(bgmac);
336335
}
337336

338337
static struct bcma_driver bgmac_bcma_driver = {

0 commit comments

Comments
 (0)