Static analysis issue:

In all other uses of the function drm_object_property_get_default_value,
the return value of the function is checked before the output is saved to
the relevant object parameter.  Though likely unnecessary given the
execution path involved, keep the behavior consistent across uses and only
set colorop_state->curve_1d_type in __drm_colorop_state_reset if
drm_object_property_get_default_value succeeds.

Signed-off-by: Jonathan Cavitt <[email protected]>
---
 drivers/gpu/drm/drm_colorop.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_colorop.c b/drivers/gpu/drm/drm_colorop.c
index 44eb823585d2..49fdb748f48e 100644
--- a/drivers/gpu/drm/drm_colorop.c
+++ b/drivers/gpu/drm/drm_colorop.c
@@ -483,10 +483,10 @@ static void __drm_colorop_state_reset(struct 
drm_colorop_state *colorop_state,
        colorop_state->bypass = true;
 
        if (colorop->curve_1d_type_property) {
-               drm_object_property_get_default_value(&colorop->base,
-                                                     
colorop->curve_1d_type_property,
-                                                     &val);
-               colorop_state->curve_1d_type = val;
+               if (!drm_object_property_get_default_value(&colorop->base,
+                                                          
colorop->curve_1d_type_property,
+                                                          &val))
+                       colorop_state->curve_1d_type = val;
        }
 }
 
-- 
2.43.0

Reply via email to