summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteffen Dirkwinkel <s.dirkwinkel@beckhoff.com>2024-10-28 14:39:40 +0100
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2024-10-30 14:22:41 +0200
commit223842c7702b52846b1c5aef8aca7474ec1fd29b (patch)
tree1d15d9fc1af934289bd549b6895777c9a9f1393e
parent28edaacb821c69241f6c0be6bbd29f7145f1b44f (diff)
drm: xlnx: zynqmp_disp: layer may be null while releasing
layer->info can be null if we have an error on the first layer in zynqmp_disp_create_layers Fixes: 1836fd5ed98d ("drm: xlnx: zynqmp_dpsub: Minimize usage of global flag") Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241028133941.54264-1-lists@steffen.cc
-rw-r--r--drivers/gpu/drm/xlnx/zynqmp_disp.c3
1 files changed, 3 insertions, 0 deletions
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];