From patchwork Mon Oct 21 13:51:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steffen Dirkwinkel X-Patchwork-Id: 13844281 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 EDD86D15DA5 for ; Mon, 21 Oct 2024 14:40:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Qm5H3iVaNzE/cyspTjKRSfgDmWv1EYY1JXmeR3OStN0=; b=sQO2BLikrTw0SfCks6LkCSfW1z UEWNmpIOV+RpmaDuh5J92XTMZLDGt4bvi4RzDHUjvlpQGI/gyppgVPQ3xZtzsfIXWH/YaF0R6ddpu PoUlbe3cqUKrCJCsYbt1tGX6VCTvb+I57SMR4Dve+80yeQLRZtAk+HUVVAAakGeGW1++CvuVIxhkS r7J1W5VMBD1nLfN5vzujNC3wz4ZlrmGhNBUvCAmD+tF69LKOYuVhd7xV0ogQ7sRsv+cNJxxSWMcI5 8eIRqoY5A5xA0oXOLJxUnQwrtYywkUsJNf25AaaYt9r8l7O5amQLzEyiUtRvRpF7jZ0JmUlrcr/2o YZ6t4F9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2taQ-00000007eG4-2GEO; Mon, 21 Oct 2024 14:40:46 +0000 Received: from mout-p-102.mailbox.org ([2001:67c:2050:0:465::102]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t2spn-00000007VBV-02Nd for linux-arm-kernel@lists.infradead.org; Mon, 21 Oct 2024 13:52:37 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4XXGvz1TLnz9slY; Mon, 21 Oct 2024 15:52:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=steffen.cc; s=MBO0001; t=1729518751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Qm5H3iVaNzE/cyspTjKRSfgDmWv1EYY1JXmeR3OStN0=; b=XMxIfD+P3ISrQks2rwOErN9A6YAYxfM7D0T4pCxnbRmIlO75GEod6Mhh33eBZT+WmukFkp uMqRneVZN8q+pD2r2bQpUeUNWy+DTLeucJKnwz/zlCmynBGm6qwkGeYwHbPxXttYvjKsWM gvI+6wnCkfxZAaynQicQwB0/Okjq504R+VI/h36p2Do6cI5EQ+kMpSoQTZaq47EkIGE91g Zw7razQ4yNqzXXD3Ozei+raosuWEVcITchEPgZZKkeIuxgnKXPljqM0Ejl3rfkUO2sYkZp 86exRn19aAB62irJozoiI8UjB88qMnq1AQ2aaSSdlABzM86C7JVyxjCPMM0+dA== From: Steffen Dirkwinkel To: dri-devel@lists.freedesktop.org, Laurent Pinchart Cc: Steffen Dirkwinkel , Tomi Valkeinen , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Michal Simek , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm: xlnx: zynqmp_disp: layer may be null while releasing Date: Mon, 21 Oct 2024 15:51:27 +0200 Message-ID: <20241021135127.218947-1-lists@steffen.cc> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241021_065235_389098_6DCA87D8 X-CRM114-Status: UNSURE ( 9.85 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Steffen Dirkwinkel layer->info can be null if we have an error on the first layer in zynqmp_disp_create_layers Signed-off-by: Steffen Dirkwinkel --- drivers/gpu/drm/xlnx/zynqmp_disp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c index 9368acf56eaf..e4e0e299e8a7 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c @@ -1200,6 +1200,9 @@ static void zynqmp_disp_layer_release_dma(struct zynqmp_disp *disp, { unsigned int i; + if (!layer->info) + return; + for (i = 0; i < layer->info->num_channels; i++) { struct zynqmp_disp_layer_dma *dma = &layer->dmas[i];