diff options
author | Guchun Chen <[email protected]> | 2019-12-23 11:40:13 +0800 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2019-12-23 14:59:51 -0500 |
commit | 46cf2fecf5971b4019c6565c2a895a77f574eb9b (patch) | |
tree | 5e0ad89d233d07ff8b7033b4675fcf0def3beaab /drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | |
parent | 55d62fe10f5ec4f4ea4c5d842a8ceb6a57db1246 (diff) |
drm/amdgpu: add missed return value set for error case
Return value should be set when going to error handle tag
for error case, this can avoid potential invalid array
access by upper caller.
Signed-off-by: Guchun Chen <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index ad593d1c2576..96fc538ec824 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -1311,6 +1311,7 @@ static int amdgpu_ras_badpages_read(struct amdgpu_device *adev, data = con->eh_data; if (!data || data->count == 0) { *bps = NULL; + ret = -EINVAL; goto out; } |