diff options
| author | Colin Ian King <[email protected]> | 2025-09-02 12:40:50 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-09-03 20:27:56 +0000 |
| commit | 467e00b30dfe75c4cfc2197ceef1fddca06adc25 (patch) | |
| tree | c328dbdd57df7576f3f55b82559054af25ff578b /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |
| parent | drm/amd/display: Clear the CUR_ENABLE register on DCN314 w/out DPP PG (diff) | |
| download | kernel-467e00b30dfe75c4cfc2197ceef1fddca06adc25.tar.gz kernel-467e00b30dfe75c4cfc2197ceef1fddca06adc25.zip | |
drm/amd/amdgpu: Fix missing error return on kzalloc failure
Currently the kzalloc failure check just sets reports the failure
and sets the variable ret to -ENOMEM, which is not checked later
for this specific error. Fix this by just returning -ENOMEM rather
than setting ret.
Fixes: 4fb930715468 ("drm/amd/amdgpu: remove redundant host to psp cmd buf allocations")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
(cherry picked from commit 1ee9d1a0962c13ba5ab7e47d33a80e3b8dc4b52e)
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 23484317a5fa..693357caa9a8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -448,7 +448,7 @@ static int psp_sw_init(struct amdgpu_ip_block *ip_block) psp->cmd = kzalloc(sizeof(struct psp_gfx_cmd_resp), GFP_KERNEL); if (!psp->cmd) { dev_err(adev->dev, "Failed to allocate memory to command buffer!\n"); - ret = -ENOMEM; + return -ENOMEM; } adev->psp.xgmi_context.supports_extended_data = |
