mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 00:39:48 +00:00
drm/amd/display: fix return value check for hdcp_work
max_caps might be 0, thus hdcp_work might be ZERO_SIZE_PTR Signed-off-by: Flora Cui <flora.cui@amd.com> Reviewed-by: Feifei Xu <Feifei.Xu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
84d244a364
commit
3704cdd30a
1 changed files with 1 additions and 1 deletions
|
@ -604,7 +604,7 @@ struct hdcp_workqueue *hdcp_create_workqueue(struct amdgpu_device *adev, struct
|
|||
int i = 0;
|
||||
|
||||
hdcp_work = kcalloc(max_caps, sizeof(*hdcp_work), GFP_KERNEL);
|
||||
if (hdcp_work == NULL)
|
||||
if (ZERO_OR_NULL_PTR(hdcp_work))
|
||||
return NULL;
|
||||
|
||||
hdcp_work->srm = kcalloc(PSP_HDCP_SRM_FIRST_GEN_MAX_SIZE, sizeof(*hdcp_work->srm), GFP_KERNEL);
|
||||
|
|
Loading…
Reference in a new issue