]> git.baikalelectronics.ru Git - kernel.git/commit
net: bgmac: Fix an erroneous kfree() in bgmac_remove()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 13 Jun 2022 20:53:50 +0000 (22:53 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 15 Jun 2022 02:16:36 +0000 (19:16 -0700)
commitdd5514b9637b3cdc562c7de2948716286e0411bb
tree44aa7475f0630d70e86ad7324e5040c6d960668d
parenta2dddc154bcadd9c93a97a79136cefe2822fb6eb
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: 2cc7abab1a0f ("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>
drivers/net/ethernet/broadcom/bgmac-bcma.c