mirror of https://gitee.com/openkylin/linux.git
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:
parent
53ced16937
commit
594f967b53
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue