drm/i915: Fix memory leak in intel_hdcp auth
Static code analysis tool reported memory leak in intel_hdcp_auth_downstream. Fixing the memory leak. v2: Rebase, move free to a cleanup label(Jani) Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Anusha Srivatsa <anusha.srivatsa@intel.com> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180404225957.7457-1-radhakrishna.sripada@intel.com
This commit is contained in:
Родитель
40da1d310e
Коммит
46a67c4d16
|
@ -435,7 +435,7 @@ int intel_hdcp_auth_downstream(struct intel_digital_port *intel_dig_port,
|
|||
|
||||
ret = shim->read_ksv_fifo(intel_dig_port, num_downstream, ksv_fifo);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* When V prime mismatches, DP Spec mandates re-read of
|
||||
|
@ -451,12 +451,15 @@ int intel_hdcp_auth_downstream(struct intel_digital_port *intel_dig_port,
|
|||
|
||||
if (i == tries) {
|
||||
DRM_ERROR("V Prime validation failed.(%d)\n", ret);
|
||||
return ret;
|
||||
goto err;
|
||||
}
|
||||
|
||||
DRM_DEBUG_KMS("HDCP is enabled (%d downstream devices)\n",
|
||||
num_downstream);
|
||||
return 0;
|
||||
ret = 0;
|
||||
err:
|
||||
kfree(ksv_fifo);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Implements Part 1 of the HDCP authorization procedure */
|
||||
|
|
Загрузка…
Ссылка в новой задаче