[PATCH 03/28] drm: handle NULL next colorop in drm_colorop_set_next_property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Chaitanya Kumar Borah <chaitanya.kumar.borah@xxxxxxxxx>

In scenarios, where there is only one colorop in a colorpipeline,
the user of the helper drm_colorop_set_next_property could use it
to set the next colorop as NULL explicitly. Make the helper handle
this case.

Note: This patch can be squashed with following patch

("drm/colorop: Add NEXT property") [1]

[1] https://patchwork.freedesktop.org/patch/566588/?series=123446&rev=3

Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@xxxxxxxxx>
---
 drivers/gpu/drm/drm_colorop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_colorop.c b/drivers/gpu/drm/drm_colorop.c
index 67e6efc90803..462ffec42cdf 100644
--- a/drivers/gpu/drm/drm_colorop.c
+++ b/drivers/gpu/drm/drm_colorop.c
@@ -286,7 +286,7 @@ void drm_colorop_set_next_property(struct drm_colorop *colorop, struct drm_color
 
 	drm_object_property_set_value(&colorop->base,
 				      colorop->next_property,
-				      next->base.id);
+				      next ? next->base.id : 0);
 	colorop->next = next;
 }
 EXPORT_SYMBOL(drm_colorop_set_next_property);
-- 
2.42.0




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux