mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
drm/amdgpu: Add -ENOMEM error handling when there is no memory
Return -ENOMEM, when there is no sufficient dynamically allocated memory Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
fcb7a1849a
commit
50fbe0cc95
@@ -1021,10 +1021,12 @@ static int mes_v11_0_mqd_sw_init(struct amdgpu_device *adev,
|
||||
|
||||
/* prepare MQD backup */
|
||||
adev->mes.mqd_backup[pipe] = kmalloc(mqd_size, GFP_KERNEL);
|
||||
if (!adev->mes.mqd_backup[pipe])
|
||||
if (!adev->mes.mqd_backup[pipe]) {
|
||||
dev_warn(adev->dev,
|
||||
"no memory to create MQD backup for ring %s\n",
|
||||
ring->name);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user