We should never be able to create a framebuffer with an unsupported format, so throw a warning if this ever happens, instead of attempting to stagger on.
Signed-off-by: Daniel Stone <[email protected]> --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 284c8a048034..8c5042fb2e7e 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -1029,8 +1029,8 @@ static int vop2_plane_atomic_check(struct drm_plane *plane, return 0; format = vop2_convert_format(fb->format->format); - if (format < 0) - return format; + /* We shouldn't be able to create a fb for an unsupported format */ + WARN_ON(format < 0); /* Co-ordinates have now been clipped */ src_x = src->x1 >> 16; -- 2.51.0
