[Intel-gfx] [PATCH v2] drm/i915/display: Set return value before returning in intel_hdcp*_disable()

Chris Wilson chris at chris-wilson.co.uk
Fri Jan 15 12:15:53 UTC 2021


drivers/gpu/drm/i915/display/intel_hdcp.c:886 _intel_hdcp_disable() error: uninitialized symbol 'ret'.
drivers/gpu/drm/i915/display/intel_hdcp.c:1951 _intel_hdcp2_disable() error: uninitialized symbol 'ret'.

For MST, it is expected to always return early before disabling the stream,
and this is not regarded as an error, so update the return value to
indicate success.

v2: Success not error.

Fixes: 2a743b7b8a8b ("drm/i915/hdcp: Configure HDCP1.4 MST steram encryption status")
Fixes: 899c8762f981 ("drm/i915/hdcp: Configure HDCP2.2 MST steram encryption status")
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Ramalingam C <ramalingam.c at intel.com>
Cc: Uma Shankar <uma.shankar at intel.com>
Cc: Anshuman Gupta <anshuman.gupta at intel.com>
Cc: Sean Paul <seanpaul at chromium.org>
Cc: Jani Nikula <jani.nikula at intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdcp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
index db8dff2eeb0a..d696f72bf669 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -883,7 +883,7 @@ static int _intel_hdcp_disable(struct intel_connector *connector)
 	 * until it disabled HDCP encryption for all connectors in MST topology.
 	 */
 	if (dig_port->num_hdcp_streams > 0)
-		return ret;
+		return 0;
 
 	hdcp->hdcp_encrypted = false;
 	intel_de_write(dev_priv, HDCP_CONF(dev_priv, cpu_transcoder, port), 0);
@@ -1948,7 +1948,7 @@ static int _intel_hdcp2_disable(struct intel_connector *connector)
 	}
 
 	if (dig_port->num_hdcp_streams > 0)
-		return ret;
+		return 0;
 
 	ret = hdcp2_disable_encryption(connector);
 
-- 
2.20.1



More information about the Intel-gfx mailing list