From patchwork Sat Dec 16 14:15:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 13495618 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6A78C46CCD for ; Sat, 16 Dec 2023 14:15:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D6B510E09B; Sat, 16 Dec 2023 14:15:39 +0000 (UTC) Received: from mail-4022.proton.ch (mail-4022.proton.ch [185.70.40.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6214A10E09B for ; Sat, 16 Dec 2023 14:15:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail2; t=1702736135; x=1702995335; bh=qkm4oW8chhqp7puwB4Up80musVJRDBjN+QOaeITuDIc=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=SecN3ggVxeCfAcLy1y+NyNodr9TsWklOmTVnEAIWf6jMyVzZ65e/s3e3qFyu052og 1j2/liuuWRfTKzSkS9R5Pc4mXNyyNY6blk9oc8z8f29jDAYBhVmkr2U1md9iTCr6AB sIiIi05VyZHWAXhSHr8IVRyYxy3pYc4FjjhmpQi7QtEu00ZrNHRvLRwbbQm8vN60rr mzqZF+XRBJGR2V9T9eP/NWY6nyBy6pBvmBIEFGByB7I1Ek2PmmEF05cxRqmqC+n3TZ u8YtoLhmQ9r4sU9eBpdyhRh+uv4UfDAMUGMqbHv2OoCuCnoqwTgPQWJU7RNndmarmP Xqpm0MsGA0inw== Date: Sat, 16 Dec 2023 14:15:27 +0000 To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH] drm/vc4: plane: check drm_gem_plane_helper_prepare_fb() return value Message-ID: <20231216141518.242811-1-contact@emersion.fr> Feedback-ID: 1358184:user:proton MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kees Cook , Maxime Ripard , Dave Stevenson Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Bubble up any error to the caller. Signed-off-by: Simon Ser Cc: Maxime Ripard Cc: Kees Cook Cc: Dave Stevenson Reviewed-by: MaĆ­ra Canal --- drivers/gpu/drm/vc4/vc4_plane.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index 00e713faecd5..b8184374332c 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c @@ -1497,13 +1497,16 @@ static int vc4_prepare_fb(struct drm_plane *plane, struct drm_plane_state *state) { struct vc4_bo *bo; + int ret; if (!state->fb) return 0; bo = to_vc4_bo(&drm_fb_dma_get_gem_obj(state->fb, 0)->base); - drm_gem_plane_helper_prepare_fb(plane, state); + ret = drm_gem_plane_helper_prepare_fb(plane, state); + if (ret) + return ret; if (plane->state->fb == state->fb) return 0;