From nobody Tue Nov 26 04:26:28 2024 Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB2FC1F80AC for ; Mon, 21 Oct 2024 13:52:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729518763; cv=none; b=Q3hpKIfRImrP5+LQfyVPXTHQiPyjOU+ozfInVmbj0pMi908KlZ9dKRTlHvu9ZDLekLPfeZF8P5RTA7J867gdccfUJFe5lqhcfWyDmHDS5RiR8fJ1wC9/KuN0lEl2YmzOTfZ41/muH365AQtw3LlmPrM4o4zbpgZ7qwhswnIn3X0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729518763; c=relaxed/simple; bh=mWS86uxMWdC6gVhIz2KdmLhzVCkDB1CjGV9cSCNuTfA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=oSZbZSrspkK9YWO1Bd0AAVM/aMyJ0tp92gySx+UMBMEn6ZKs+/GOcVvbKMTUD2Srjjo4YlDPfqtyCngtELTelzuE4gwZtDI7OUEVOIZ1FZ2RL1MB6mlL00XKcSqdR4GQfpteXBP06HrfxHXWVkZ9oBs4NtYhXVyDxANoWoCMTAQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=steffen.cc; spf=pass smtp.mailfrom=steffen.cc; dkim=pass (2048-bit key) header.d=steffen.cc header.i=@steffen.cc header.b=XMxIfD+P; arc=none smtp.client-ip=80.241.56.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=steffen.cc Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=steffen.cc Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=steffen.cc header.i=@steffen.cc header.b="XMxIfD+P" 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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/zynq= mp_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 zynq= mp_disp *disp, { unsigned int i; =20 + if (!layer->info) + return; + for (i =3D 0; i < layer->info->num_channels; i++) { struct zynqmp_disp_layer_dma *dma =3D &layer->dmas[i]; =20 --=20 2.47.0