drm/i915/hdcp: Fix uninitialized symbol
authorAnshuman Gupta <anshuman.gupta@intel.com>
Wed, 20 Jan 2021 10:30:32 +0000 (16:00 +0530)
committerAnshuman Gupta <anshuman.gupta@intel.com>
Fri, 22 Jan 2021 10:34:25 +0000 (16:04 +0530)
commit40a6cead28f841ac350bd38dd7260ecacd5eab03
treef351e6684c01b2f60ff0bbf1d65d6480fbd9719a
parent7fde594fd866dcec4d126fff9a284ccb2fe1266a
drm/i915/hdcp: Fix uninitialized symbol

Move (num_hdcp_streams > 0) condition to stream_encryption()
code block, where it actually belongs.
This fixes the static analysis error of uninitialized symbol 'ret'.

v2:
- return 0 as the return value is already checked. [Ankit]

Cc: Ramalingam C <ramalingam.c@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.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/20210120103032.15198-1-anshuman.gupta@intel.com
drivers/gpu/drm/i915/display/intel_hdcp.c