drm/i915/debugfs: HDCP capability enc NULL check
authorAnshuman Gupta <anshuman.gupta@intel.com>
Thu, 11 Feb 2021 14:05:02 +0000 (19:35 +0530)
committerAnshuman Gupta <anshuman.gupta@intel.com>
Fri, 12 Feb 2021 09:41:28 +0000 (15:11 +0530)
commit357b5592e018b0faa9d49f1f8b58a4966391bcbd
tree5a10731986389540ac0769403468f8a4511762ca
parent885d3e5b6f08afda80e55d2682237a2bc599a7fd
drm/i915/debugfs: HDCP capability enc NULL check

DP-MST connector encoder initializes at modeset
Adding a connector->encoder NULL check in order to
avoid any NULL pointer dereference.
intel_hdcp_enable() already handle this but debugfs
can also invoke the intel_{hdcp,hdcp2_capable}.
Handling it gracefully.

v2:
- Use necessary lock and NULL check in
  i915_hdcp_sink_capability_show. [Imre]

Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210211140502.22786-1-anshuman.gupta@intel.com
drivers/gpu/drm/i915/display/intel_display_debugfs.c