Commit e640e7cc authored by Maxime Ripard's avatar Maxime Ripard

drm/tests: probe_helper: Fix uninitialized variable

The len variable is used while uninitialized. Initialize it.

Fixes: 1e4a91db ("drm/probe-helper: Provide a TV get_modes helper")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20221201090736.290935-1-maxime@cerno.techSigned-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
parent 0f9aa074
......@@ -115,6 +115,7 @@ drm_test_connector_helper_tv_get_modes_check(struct kunit *test)
ret = drm_connector_helper_tv_get_modes(connector);
KUNIT_EXPECT_EQ(test, ret, params->num_expected_modes);
len = 0;
list_for_each_entry(mode, &connector->probed_modes, head)
len++;
KUNIT_EXPECT_EQ(test, len, params->num_expected_modes);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment