All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: bgmac: Fix an erroneous kfree() in bgmac_remove()
@ 2022-06-13 20:53 Christophe JAILLET
  2022-06-13 21:39 ` Florian Fainelli
  2022-06-15  2:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2022-06-13 20:53 UTC (permalink / raw)
  To: Rafał Miłecki, Broadcom internal kernel review list,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Florian Fainelli
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, netdev

'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: 34a5102c3235 ("net: bgmac: allocate struct bgmac just once & don't copy it"
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/net/ethernet/broadcom/bgmac-bcma.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bgmac-bcma.c b/drivers/net/ethernet/broadcom/bgmac-bcma.c
index e6f48786949c..02bd3cf9a260 100644
--- a/drivers/net/ethernet/broadcom/bgmac-bcma.c
+++ b/drivers/net/ethernet/broadcom/bgmac-bcma.c
@@ -332,7 +332,6 @@ static void bgmac_remove(struct bcma_device *core)
 	bcma_mdio_mii_unregister(bgmac->mii_bus);
 	bgmac_enet_remove(bgmac);
 	bcma_set_drvdata(core, NULL);
-	kfree(bgmac);
 }
 
 static struct bcma_driver bgmac_bcma_driver = {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: bgmac: Fix an erroneous kfree() in bgmac_remove()
  2022-06-13 20:53 [PATCH] net: bgmac: Fix an erroneous kfree() in bgmac_remove() Christophe JAILLET
@ 2022-06-13 21:39 ` Florian Fainelli
  2022-06-15  2:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2022-06-13 21:39 UTC (permalink / raw)
  To: Christophe JAILLET, Rafał Miłecki,
	Broadcom internal kernel review list, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Florian Fainelli
  Cc: linux-kernel, kernel-janitors, netdev

On 6/13/22 13:53, Christophe JAILLET wrote:
> '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: 34a5102c3235 ("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>
-- 
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: bgmac: Fix an erroneous kfree() in bgmac_remove()
  2022-06-13 20:53 [PATCH] net: bgmac: Fix an erroneous kfree() in bgmac_remove() Christophe JAILLET
  2022-06-13 21:39 ` Florian Fainelli
@ 2022-06-15  2:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-06-15  2:20 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: rafal, bcm-kernel-feedback-list, davem, edumazet, kuba, pabeni,
	f.fainelli, linux-kernel, kernel-janitors, netdev

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 13 Jun 2022 22:53:50 +0200 you wrote:
> '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: 34a5102c3235 ("net: bgmac: allocate struct bgmac just once & don't copy it"
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 
> [...]

Here is the summary with links:
  - net: bgmac: Fix an erroneous kfree() in bgmac_remove()
    https://git.kernel.org/netdev/net/c/d7dd6eccfbc9

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-15  2:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-13 20:53 [PATCH] net: bgmac: Fix an erroneous kfree() in bgmac_remove() Christophe JAILLET
2022-06-13 21:39 ` Florian Fainelli
2022-06-15  2:20 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.