]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/hdcp: return correct error code
authorAnshuman Gupta <anshuman.gupta@intel.com>
Fri, 19 Mar 2021 10:02:08 +0000 (15:32 +0530)
committerAnshuman Gupta <anshuman.gupta@intel.com>
Mon, 22 Mar 2021 06:52:09 +0000 (12:22 +0530)
hdcp2_enable_stream_encryption shouldn't get called in case
of any port authentication or encryption error, though
hdcp2_enable_stream_encryption checks for link encryption
before enabling stream encryption and returns error but
this return error code won't be correct in case of any error
due to port authentication and encryption.

Cc: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210319100208.5886-4-anshuman.gupta@intel.com
drivers/gpu/drm/i915/display/intel_hdcp.c

index 77650677ba6f61908ca335a3e3a6a228ca9f151f..9248536e490666d3496c906c49aa061e9dd9aeda 100644 (file)
@@ -1911,7 +1911,8 @@ static int hdcp2_authenticate_and_encrypt(struct intel_connector *connector)
                }
        }
 
-       ret = hdcp2_enable_stream_encryption(connector);
+       if (!ret)
+               ret = hdcp2_enable_stream_encryption(connector);
 
        return ret;
 }