diff mbox series

drm/rockchip: vop2: unlock on error path in vop2_crtc_atomic_enable()

Message ID YnjZQRV9lpub2ET8@kili (mailing list archive)
State New, archived
Headers show
Series drm/rockchip: vop2: unlock on error path in vop2_crtc_atomic_enable() | expand

Commit Message

Dan Carpenter May 9, 2022, 9:05 a.m. UTC
This error path needs an unlock before returning.

Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Sascha Hauer May 9, 2022, 9:51 a.m. UTC | #1
On Mon, May 09, 2022 at 12:05:05PM +0300, Dan Carpenter wrote:
> This error path needs an unlock before returning.

Indeed.

> 
> Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>

Sascha

> ---
>  drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> index 0b49fed16535..b68922943825 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> @@ -1524,6 +1524,7 @@ static void vop2_crtc_atomic_enable(struct drm_crtc *crtc,
>  	if (ret < 0) {
>  		drm_err(vop2->drm, "failed to enable dclk for video port%d - %d\n",
>  			vp->id, ret);
> +		vop2_unlock(vop2);
>  		return;
>  	}
>  
> -- 
> 2.35.1
> 
>
Heiko Stuebner May 15, 2022, 8:07 p.m. UTC | #2
On Mon, 9 May 2022 12:05:05 +0300, Dan Carpenter wrote:
> This error path needs an unlock before returning.

Applied, thanks!

[1/1] drm/rockchip: vop2: unlock on error path in vop2_crtc_atomic_enable()
      commit: 98526c5bbe3267d447ddd076b685439e3e1396c6

Best regards,
diff mbox series

Patch

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
index 0b49fed16535..b68922943825 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
@@ -1524,6 +1524,7 @@  static void vop2_crtc_atomic_enable(struct drm_crtc *crtc,
 	if (ret < 0) {
 		drm_err(vop2->drm, "failed to enable dclk for video port%d - %d\n",
 			vp->id, ret);
+		vop2_unlock(vop2);
 		return;
 	}