diff mbox series

[02/10] drm/malidp: plane_state->fb iff plane_state->crtc

Message ID 20191213172612.1514842-2-daniel.vetter@ffwll.ch
State New, archived
Headers show
Series [01/10] drm/todo: Add item for the plane->atomic_check confusion | expand

Commit Message

Daniel Vetter Dec. 13, 2019, 5:26 p.m. UTC
Checking both is one too much, so wrap a WARN_ON around it to stope
the copypasta.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Cc:
---
 drivers/gpu/drm/arm/malidp_planes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Liviu Dudau Dec. 16, 2019, 9:19 a.m. UTC | #1
On Fri, Dec 13, 2019 at 06:26:04PM +0100, Daniel Vetter wrote:
> Checking both is one too much, so wrap a WARN_ON around it to stope
> the copypasta.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>

Acked-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu

> Cc: Brian Starkey <brian.starkey@arm.com>
> Cc:
> ---
>  drivers/gpu/drm/arm/malidp_planes.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c
> index 3c70a53813bf..37715cc6064e 100644
> --- a/drivers/gpu/drm/arm/malidp_planes.c
> +++ b/drivers/gpu/drm/arm/malidp_planes.c
> @@ -512,7 +512,7 @@ static int malidp_de_plane_check(struct drm_plane *plane,
>  	int i, ret;
>  	unsigned int block_w, block_h;
>  
> -	if (!state->crtc || !state->fb)
> +	if (!state->crtc || WARN_ON(!state->fb))
>  		return 0;
>  
>  	fb = state->fb;
> -- 
> 2.24.0
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c
index 3c70a53813bf..37715cc6064e 100644
--- a/drivers/gpu/drm/arm/malidp_planes.c
+++ b/drivers/gpu/drm/arm/malidp_planes.c
@@ -512,7 +512,7 @@  static int malidp_de_plane_check(struct drm_plane *plane,
 	int i, ret;
 	unsigned int block_w, block_h;
 
-	if (!state->crtc || !state->fb)
+	if (!state->crtc || WARN_ON(!state->fb))
 		return 0;
 
 	fb = state->fb;