[linux-next:master 6570/8400] drivers/gpu/drm/tegra/output.c:42 tegra_output_connector_get_modes() error: uninitialized symbol 'drm_edid'.

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ecc768a84f0b8e631986f9ade3118fa37852fef0
commit: 98365ca74cbfae16b793b62a7ecabb5be8d77785 [6570/8400] drm/tegra: convert to struct drm_edid
config: nios2-randconfig-r072-20240902 (https://download.01.org/0day-ci/archive/20240902/202409022236.7pEcEksT-lkp@xxxxxxxxx/config)
compiler: nios2-linux-gcc (GCC) 14.1.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Reported-by: Dan Carpenter <error27@xxxxxxxxx>
| Closes: https://lore.kernel.org/r/202409022236.7pEcEksT-lkp@xxxxxxxxx/

smatch warnings:
drivers/gpu/drm/tegra/output.c:42 tegra_output_connector_get_modes() error: uninitialized symbol 'drm_edid'.

vim +/drm_edid +42 drivers/gpu/drm/tegra/output.c

132085d84fca65 Thierry Reding 2014-11-28  21  int tegra_output_connector_get_modes(struct drm_connector *connector)
d8f4a9eda00678 Thierry Reding 2012-11-15  22  {
d8f4a9eda00678 Thierry Reding 2012-11-15  23  	struct tegra_output *output = connector_to_output(connector);
98365ca74cbfae Jani Nikula    2024-08-22  24  	const struct drm_edid *drm_edid;

There used to be an = NULL here.

d8f4a9eda00678 Thierry Reding 2012-11-15  25  	int err = 0;
d8f4a9eda00678 Thierry Reding 2012-11-15  26  
acde541324dcfe Thierry Reding 2014-01-13  27  	/*
acde541324dcfe Thierry Reding 2014-01-13  28  	 * If the panel provides one or more modes, use them exclusively and
acde541324dcfe Thierry Reding 2014-01-13  29  	 * ignore any other means of obtaining a mode.
acde541324dcfe Thierry Reding 2014-01-13  30  	 */
9be7d864cf0763 Thierry Reding 2013-08-30  31  	if (output->panel) {
06c4a9c2ae606a Sam Ravnborg   2019-12-07  32  		err = drm_panel_get_modes(output->panel, connector);
9be7d864cf0763 Thierry Reding 2013-08-30  33  		if (err > 0)
9be7d864cf0763 Thierry Reding 2013-08-30  34  			return err;
9be7d864cf0763 Thierry Reding 2013-08-30  35  	}
9be7d864cf0763 Thierry Reding 2013-08-30  36  
98365ca74cbfae Jani Nikula    2024-08-22  37  	if (output->drm_edid)
98365ca74cbfae Jani Nikula    2024-08-22  38  		drm_edid = drm_edid_dup(output->drm_edid);
d8f4a9eda00678 Thierry Reding 2012-11-15  39  	else if (output->ddc)
98365ca74cbfae Jani Nikula    2024-08-22  40  		drm_edid = drm_edid_read_ddc(connector, output->ddc);

I mean presumably either ->drm_edid or ->ddc is true, but you can see why the
checker complains.

d8f4a9eda00678 Thierry Reding 2012-11-15  41  
98365ca74cbfae Jani Nikula    2024-08-22 @42  	drm_edid_connector_update(connector, drm_edid);
98365ca74cbfae Jani Nikula    2024-08-22  43  	cec_notifier_set_phys_addr(output->cec,
98365ca74cbfae Jani Nikula    2024-08-22  44  				   connector->display_info.source_physical_address);
d8f4a9eda00678 Thierry Reding 2012-11-15  45  
98365ca74cbfae Jani Nikula    2024-08-22  46  	err = drm_edid_connector_add_modes(connector);
98365ca74cbfae Jani Nikula    2024-08-22  47  	drm_edid_free(drm_edid);
d8f4a9eda00678 Thierry Reding 2012-11-15  48  
d8f4a9eda00678 Thierry Reding 2012-11-15  49  	return err;
d8f4a9eda00678 Thierry Reding 2012-11-15  50  }

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux