Commit d34f4f05 authored by Suraj Kandpal's avatar Suraj Kandpal

drm/i915/hdcp: Add encoder check in hdcp2_get_capability

Add encoder check in intel_hdcp2_get_capability to avoid
null pointer error.
Signed-off-by: default avatarSuraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: default avatarDnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240722064451.3610512-3-suraj.kandpal@intel.com
parent 31b42af5
......@@ -675,8 +675,15 @@ static
int intel_dp_hdcp2_get_capability(struct intel_connector *connector,
bool *capable)
{
struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
struct drm_dp_aux *aux = &dig_port->dp.aux;
struct intel_digital_port *dig_port;
struct drm_dp_aux *aux;
*capable = false;
if (!intel_attached_encoder(connector))
return -EINVAL;
dig_port = intel_attached_dig_port(connector);
aux = &dig_port->dp.aux;
return _intel_dp_hdcp2_get_capability(aux, capable);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment