[PATCH 0/4] fix leaked of_node references in drivers/media

From: Wen Yang
Date: Mon May 06 2019 - 03:04:16 EST


The call to of_get_cpu_node/of_find_compatible_node/of_parse_phandle...
returns a node pointer with refcount incremented thus it must be
explicitly decremented after the last usage.

We developed a coccinelle SmPL to detect drivers/media/ code and
found some issues.
This patch series fixes those issues.

Wen Yang (4):
media: venus: firmware: fix leaked of_node references
media: mtk-vpu: fix leaked of_node references
media: mtk-vcodec: fix leaked of_node references
media: xilinx: fix leaked of_node references

drivers/media/platform/exynos4-is/fimc-is.c | 1 +
drivers/media/platform/exynos4-is/media-dev.c | 1 +
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c | 2 +-
drivers/media/platform/mtk-vpu/mtk_vpu.c | 2 +-
drivers/media/platform/qcom/venus/firmware.c | 6 ++++--
drivers/media/platform/xilinx/xilinx-vipp.c | 8 +++++---
6 files changed, 13 insertions(+), 7 deletions(-)

Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
Cc: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
Cc: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx>
Cc: Kieran Bingham <kieran.bingham+renesas@xxxxxxxxxxxxxxxx>
Cc: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
Cc: Stanimir Varbanov <stanimir.varbanov@xxxxxxxxxx>
Cc: linux-media@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx

--
2.9.5