From: Wei Yongjun Date: Tue, 30 Nov 2021 10:48:40 +0000 (+0000) Subject: net: ixp4xx_hss: drop kfree for memory allocated with devm_kzalloc X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=196073f9c44be0b4758ead11e51bc2875f98df29;p=uclinux-h8%2Flinux.git net: ixp4xx_hss: drop kfree for memory allocated with devm_kzalloc 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 Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller --- 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; }