mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 17:51:57 +09:00
drm: rcar-du: Release vsp device reference in all error paths
Use drmm_add_action_or_reset() instead of drmm_add_action() to ensure the vsp device reference is released in case the function call fails. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
This commit is contained in:
@@ -364,7 +364,7 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np,
|
||||
|
||||
vsp->vsp = &pdev->dev;
|
||||
|
||||
ret = drmm_add_action(rcdu->ddev, rcar_du_vsp_cleanup, vsp);
|
||||
ret = drmm_add_action_or_reset(rcdu->ddev, rcar_du_vsp_cleanup, vsp);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user