From: Jani Nikula Date: Mon, 2 Sep 2024 16:13:17 +0000 (+0300) Subject: drm/tegra: fix potential uninitialized variable use X-Git-Tag: microblaze-v6.13~18^2~8^2 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=ba2b9de0c1ac2abfbe663414a292c5881e64c361;p=linux-2.6-microblaze.git 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. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/ZtXLyXxew7z6H2bD@stanley.mountain Fixes: 98365ca74cbf ("drm/tegra: convert to struct drm_edid") Cc: Thierry Reding Cc: Daniel Vetter Cc: linux-tegra@vger.kernel.org Acked-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20240902161317.2437148-1-jani.nikula@intel.com Signed-off-by: Jani Nikula (cherry picked from commit 8e514bad271723473d31fcc496f7143ba49c43c5) Signed-off-by: Thomas Zimmermann --- 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; /*