Skip to contentSkip to conversation

drm/tegra: fix potential uninitialized variable use

PATCH In review Jani Nikula 2 participants 3 messages Sep 2, 2024 – Sep 3, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/tegra: fix potential uninitialized variable use

It's likely either output->drm_edid or output->ddc is non-NULL, but avoid the uninitialized variable usage anyway.

Fixes 98365ca74cbf ("drm/tegra: convert to struct drm_edid")
Cc Thierry Reding <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/tegra/output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tegra/output.c +1 -1
index e6b5863fec71..49e4f63a5550 100644
@@ -21,7 +21,7 @@
 int tegra_output_connector_get_modes(struct drm_connector *connector)
 {
 	struct tegra_output *output = connector_to_output(connector);
-	const struct drm_edid *drm_edid;
+	const struct drm_edid *drm_edid = NULL;
 	int err = 0;
 
 	/*
Signature · 1 line
2.39.2
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Jani Nikula

It's likely either output->drm_edid or output->ddc is non-NULL, but avoid the uninitialized variable usage anyway.

Fixes 98365ca74cbf ("drm/tegra: convert to struct drm_edid")
Cc Thierry Reding <[email protected]>
Cc Daniel Vetter <[email protected]>
Quoted 3 lines
---
 drivers/gpu/drm/tegra/output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Do you want to apply this or should I? In the former case:

#2 lore raw
Quoted 15 lines · Thierry Reding
Quoted 10 lines · Jani Nikula

It's likely either output->drm_edid or output->ddc is non-NULL, but avoid the uninitialized variable usage anyway.

Fixes 98365ca74cbf ("drm/tegra: convert to struct drm_edid")
Cc Thierry Reding <[email protected]>
Cc Daniel Vetter <[email protected]>
Quoted 3 lines
---
 drivers/gpu/drm/tegra/output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 3 lines

Do you want to apply this or should I? In the former case:

Thanks, pushed to drm-misc-next.

BR,
Jani.

Signature · 1 line
Jani Nikula, Intel