drm/tests: Fix a test in drm_test_check_valid_clones()

The drm_atomic_get_crtc_state() function returns error pointers and not
NULL.  Update the check to check for error pointers as well as NULL.

Fixes: 88849f24e2 ("drm/tests: Add test for drm_atomic_helper_check_modeset()")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/c50f11c7-932c-47dc-b40f-4ada8b9b6679@stanley.mountain
Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
Dan Carpenter
2025-02-12 18:24:09 +03:00
committed by Maxime Ripard
parent efc84f661e
commit e5f5f7ccae

View File

@@ -283,7 +283,7 @@ static void drm_test_check_valid_clones(struct kunit *test)
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, state);
crtc_state = drm_atomic_get_crtc_state(state, priv->crtc);
KUNIT_ASSERT_NOT_NULL(test, crtc_state);
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, crtc_state);
crtc_state->encoder_mask = param->encoder_mask;