[PATCH] drm/tegra: fix potential uninitialized variable use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Reported-by: kernel test robot <dan.carpenter@xxxxxxxxxx>
Closes: https://lore.kernel.org/r/ZtXLyXxew7z6H2bD@stanley.mountain
Fixes: 98365ca74cbf ("drm/tegra: convert to struct drm_edid")
Cc: Thierry Reding <treding@xxxxxxxxxx>
Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
Cc: linux-tegra@xxxxxxxxxxxxxxx
Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
---
 drivers/gpu/drm/tegra/output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
index e6b5863fec71..49e4f63a5550 100644
--- a/drivers/gpu/drm/tegra/output.c
+++ b/drivers/gpu/drm/tegra/output.c
@@ -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;
 
 	/*
-- 
2.39.2




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux