[Intel-gfx] [drm-intel:drm-intel-next 8/19] drivers/gpu/drm/i915/display/intel_hdcp.c:817 _intel_hdcp_disable() error: uninitialized symbol 'ret'.

Dan Carpenter dan.carpenter at oracle.com
Tue Jan 19 06:59:53 UTC 2021


tree:   git://anongit.freedesktop.org/drm-intel drm-intel-next
head:   d5a0d4b9380a499cc140c7ee04ec80e15a8d49e5
commit: 2a743b7b8a8be8c8fc7c130c304c1243f6bbe9b7 [8/19] drm/i915/hdcp: Configure HDCP1.4 MST steram encryption status
config: x86_64-randconfig-m001-20210115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
Reported-by: Dan Carpenter <dan.carpenter at oracle.com>

smatch warnings:
drivers/gpu/drm/i915/display/intel_hdcp.c:817 _intel_hdcp_disable() error: uninitialized symbol 'ret'.

vim +/ret +817 drivers/gpu/drm/i915/display/intel_hdcp.c

ee5e5e7a5e0fde drivers/gpu/drm/i915/intel_hdcp.c         Sean Paul       2018-01-08  788  static int _intel_hdcp_disable(struct intel_connector *connector)
ee5e5e7a5e0fde drivers/gpu/drm/i915/intel_hdcp.c         Sean Paul       2018-01-08  789  {
7801f3b792b0fd drivers/gpu/drm/i915/display/intel_hdcp.c Lucas De Marchi 2020-06-30  790  	struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
486bba4524e00c drivers/gpu/drm/i915/display/intel_hdcp.c Ville Syrjälä   2019-12-04  791  	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
486bba4524e00c drivers/gpu/drm/i915/display/intel_hdcp.c Ville Syrjälä   2019-12-04  792  	struct intel_hdcp *hdcp = &connector->hdcp;
7801f3b792b0fd drivers/gpu/drm/i915/display/intel_hdcp.c Lucas De Marchi 2020-06-30  793  	enum port port = dig_port->base.port;
692059318c0fc6 drivers/gpu/drm/i915/display/intel_hdcp.c Ramalingam C    2019-08-28  794  	enum transcoder cpu_transcoder = hdcp->cpu_transcoder;
2cc0c7b520bf8e drivers/gpu/drm/i915/display/intel_hdcp.c Sean Paul       2020-08-18  795  	u32 repeater_ctl;
ee5e5e7a5e0fde drivers/gpu/drm/i915/intel_hdcp.c         Sean Paul       2018-01-08  796  	int ret;
                                                                                                ^^^^^^^

ee5e5e7a5e0fde drivers/gpu/drm/i915/intel_hdcp.c         Sean Paul       2018-01-08  797  
65833c463886fa drivers/gpu/drm/i915/display/intel_hdcp.c Wambui Karuga   2020-01-22  798  	drm_dbg_kms(&dev_priv->drm, "[%s:%d] HDCP is being disabled...\n",
cb340bf37173d6 drivers/gpu/drm/i915/intel_hdcp.c         Ramalingam C    2018-02-03  799  		    connector->base.name, connector->base.base.id);
cb340bf37173d6 drivers/gpu/drm/i915/intel_hdcp.c         Ramalingam C    2018-02-03  800  
2a743b7b8a8be8 drivers/gpu/drm/i915/display/intel_hdcp.c Anshuman Gupta  2021-01-11  801  	if (hdcp->shim->stream_encryption) {
2a743b7b8a8be8 drivers/gpu/drm/i915/display/intel_hdcp.c Anshuman Gupta  2021-01-11  802  		ret = hdcp->shim->stream_encryption(connector, false);
2a743b7b8a8be8 drivers/gpu/drm/i915/display/intel_hdcp.c Anshuman Gupta  2021-01-11  803  		if (ret) {
2a743b7b8a8be8 drivers/gpu/drm/i915/display/intel_hdcp.c Anshuman Gupta  2021-01-11  804  			drm_err(&dev_priv->drm, "[%s:%d] Failed to disable HDCP 1.4 stream enc\n",
2a743b7b8a8be8 drivers/gpu/drm/i915/display/intel_hdcp.c Anshuman Gupta  2021-01-11  805  				connector->base.name, connector->base.base.id);
2a743b7b8a8be8 drivers/gpu/drm/i915/display/intel_hdcp.c Anshuman Gupta  2021-01-11  806  			return ret;
2a743b7b8a8be8 drivers/gpu/drm/i915/display/intel_hdcp.c Anshuman Gupta  2021-01-11  807  		}
2a743b7b8a8be8 drivers/gpu/drm/i915/display/intel_hdcp.c Anshuman Gupta  2021-01-11  808  		drm_dbg_kms(&dev_priv->drm, "HDCP 1.4 transcoder: %s stream encryption disabled\n",
2a743b7b8a8be8 drivers/gpu/drm/i915/display/intel_hdcp.c Anshuman Gupta  2021-01-11  809  			    transcoder_name(hdcp->stream_transcoder));
2a743b7b8a8be8 drivers/gpu/drm/i915/display/intel_hdcp.c Anshuman Gupta  2021-01-11  810  	}
2a743b7b8a8be8 drivers/gpu/drm/i915/display/intel_hdcp.c Anshuman Gupta  2021-01-11  811  
36e5e7042b2020 drivers/gpu/drm/i915/display/intel_hdcp.c Sean Paul       2020-08-18  812  	/*
2a743b7b8a8be8 drivers/gpu/drm/i915/display/intel_hdcp.c Anshuman Gupta  2021-01-11  813  	 * If there are other connectors on this port using HDCP, don't disable it
2a743b7b8a8be8 drivers/gpu/drm/i915/display/intel_hdcp.c Anshuman Gupta  2021-01-11  814  	 * until it disabled HDCP encryption for all connectors in MST topology.
36e5e7042b2020 drivers/gpu/drm/i915/display/intel_hdcp.c Sean Paul       2020-08-18  815  	 */
2a743b7b8a8be8 drivers/gpu/drm/i915/display/intel_hdcp.c Anshuman Gupta  2021-01-11  816  	if (dig_port->num_hdcp_streams > 0)
36e5e7042b2020 drivers/gpu/drm/i915/display/intel_hdcp.c Sean Paul       2020-08-18 @817  		return ret;

Presumably an error code was intended instead of an unintialized variable.

36e5e7042b2020 drivers/gpu/drm/i915/display/intel_hdcp.c Sean Paul       2020-08-18  818  
09d56393c1d8d5 drivers/gpu/drm/i915/intel_hdcp.c         Ramalingam C    2019-02-16  819  	hdcp->hdcp_encrypted = false;
667944ad77f197 drivers/gpu/drm/i915/display/intel_hdcp.c Jani Nikula     2020-01-27  820  	intel_de_write(dev_priv, HDCP_CONF(dev_priv, cpu_transcoder, port), 0);
692059318c0fc6 drivers/gpu/drm/i915/display/intel_hdcp.c Ramalingam C    2019-08-28  821  	if (intel_de_wait_for_clear(dev_priv,

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 34082 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20210119/2636c2ce/attachment-0001.gz>


More information about the Intel-gfx mailing list