diff mbox series

[net-next] net: ixp4xx_hss: drop kfree for memory allocated with devm_kzalloc

Message ID 20211130104840.1767981-1-weiyongjun1@huawei.com (mailing list archive)
State Accepted
Commit 196073f9c44be0b4758ead11e51bc2875f98df29
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: ixp4xx_hss: drop kfree for memory allocated with devm_kzalloc | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Wei Yongjun Nov. 30, 2021, 10:48 a.m. UTC
It's not necessary to free memory allocated with devm_kzalloc
and using kfree leads to a double free.

Fixes: 35aefaad326b ("net: ixp4xx_hss: Convert to use DT probing")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/wan/ixp4xx_hss.c | 1 -
 1 file changed, 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 30, 2021, 12:50 p.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Tue, 30 Nov 2021 10:48:40 +0000 you wrote:
> It's not necessary to free memory allocated with devm_kzalloc
> and using kfree leads to a double free.
> 
> Fixes: 35aefaad326b ("net: ixp4xx_hss: Convert to use DT probing")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> 
> [...]

Here is the summary with links:
  - [net-next] net: ixp4xx_hss: drop kfree for memory allocated with devm_kzalloc
    https://git.kernel.org/netdev/net-next/c/196073f9c44b

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c
index d02d8a2eb99d..0b7d9f2f2b8b 100644
--- a/drivers/net/wan/ixp4xx_hss.c
+++ b/drivers/net/wan/ixp4xx_hss.c
@@ -1508,7 +1508,6 @@  static int ixp4xx_hss_remove(struct platform_device *pdev)
 	unregister_hdlc_device(port->netdev);
 	free_netdev(port->netdev);
 	npe_release(port->npe);
-	kfree(port);
 	return 0;
 }