Skip to content

Commit

Permalink
net: ixp4xx_hss: drop kfree for memory allocated with devm_kzalloc
Browse files Browse the repository at this point in the history
It's not necessary to free memory allocated with devm_kzalloc
and using kfree leads to a double free.

Fixes: 35aefaa ("net: ixp4xx_hss: Convert to use DT probing")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Nov 30, 2021
1 parent 9c32950 commit 196073f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/wan/ixp4xx_hss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 196073f

Please sign in to comment.