Skip to content

net: ethernet: mtk_eth_wed: fixe some leaks

Yang Yingliang linux-mediatek netdev 1 version Applied

Status from this message: This series was applied to netdev/net.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net: ethernet: mtk_eth_soc: fix possible memory leak in mtk_probe()drivers/net/ethernet/mediatek/mtk_eth_soc.c+12 -51 replyApplied
2/3net: ethernet: mtk_eth_wed: add missing put_device() in mtk_wed_add_hw()drivers/net/ethernet/mediatek/mtk_wed.c+8 -21 replyApplied
3/3net: ethernet: mtk_eth_wed: add missing of_node_put()drivers/net/ethernet/mediatek/mtk_wed.c+4 -11 replyApplied

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchAngeloGioacchino Del Regno
1/3
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net 0/3] net: ethernet: mtk_eth_wed: fixe some leaks

I found some leaks in mtk_eth_soc.c/mtk_wed.c.

patch#1 - I found mtk_wed_exit() is never called, I think mtk_wed_exit() need
be called in error path or module remove function to free the memory allocated in mtk_wed_add_hw().

patch#2 - The device is not put in error path in mtk_wed_add_hw().

patch#3 - The device_node pointer returned by of_parse_phandle() with refcount
incremented, it should be decreased when it done.

This patchset was just compiled tested because I don't have any HW on which to do the actual tests.

Yang Yingliang (3):
net: ethernet: mtk_eth_soc: fix possible memory leak in mtk_probe()
net: ethernet: mtk_eth_wed: add missing put_device() in

    mtk_wed_add_hw()

net: ethernet: mtk_eth_wed: add missing of_node_put()

 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 17 ++++++++++++-----
 drivers/net/ethernet/mediatek/mtk_wed.c     | 15 ++++++++++++---
 2 files changed, 24 insertions(+), 8 deletions(-)
Signature · 1 line
2.25.1