[PATCH 08/24] drm/mtk: Promote impossible internal error to WARN_ON

Daniel Stone daniels at collabora.com
Fri Mar 30 14:11:22 UTC 2018


A FB with no object is something we should be shouting very loudly
about, not quietly logging as debug.

Signed-off-by: Daniel Stone <daniels at collabora.com>
Cc: CK Hu <ck.hu at mediatek.com>
Cc: Philipp Zabel <p.zabel at pengutronix.de>
---
 drivers/gpu/drm/mediatek/mtk_drm_plane.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
index 2f4b0ffee598..ac010365d88b 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
@@ -95,10 +95,7 @@ static int mtk_plane_atomic_check(struct drm_plane *plane,
 	if (!fb)
 		return 0;
 
-	if (!mtk_fb_get_gem_obj(fb)) {
-		DRM_DEBUG_KMS("buffer is null\n");
-		return -EFAULT;
-	}
+	WARN_ON(!mtk_fb_get_gem_obj(fb));
 
 	if (!state->crtc)
 		return 0;
-- 
2.16.2



More information about the dri-devel mailing list