drm: rcar-du: Put reference to VSP device
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 15 Sep 2020 23:23:47 +0000 (02:23 +0300)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 22 Sep 2020 11:10:05 +0000 (14:10 +0300)
commit2a32dbdc2c7db5463483fa01fb220fd1b770c6bc
tree7de4f00a9644afb506f41eb96b1a0307c6b9d7f3
parent709b66b4b745bca5324941cd4d7a34ffeba87cf0
drm: rcar-du: Put reference to VSP device

The reference to the VSP device acquired with of_find_device_by_node()
in rcar_du_vsp_init() is never released. Fix it with a drmm action,
which gets run both in the probe error path and in the remove path.

Fixes: 6d62ef3ac30b ("drm: rcar-du: Expose the VSP1 compositor through KMS planes")
Reported-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_vsp.c