projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f9aa07
)
drm/tests: probe_helper: Fix uninitialized variable
author
Maxime Ripard
<maxime@cerno.tech>
Thu, 1 Dec 2022 09:07:36 +0000
(10:07 +0100)
committer
Maxime Ripard
<maxime@cerno.tech>
Thu, 1 Dec 2022 10:13:24 +0000
(11:13 +0100)
The len variable is used while uninitialized. Initialize it.
Fixes:
1e4a91db109f
("drm/probe-helper: Provide a TV get_modes helper")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link:
https://lore.kernel.org/r/20221201090736.290935-1-maxime@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/tests/drm_probe_helper_test.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/tests/drm_probe_helper_test.c
b/drivers/gpu/drm/tests/drm_probe_helper_test.c
index
7e93825
..
2111314
100644
(file)
--- a/
drivers/gpu/drm/tests/drm_probe_helper_test.c
+++ b/
drivers/gpu/drm/tests/drm_probe_helper_test.c
@@
-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);