projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55d62fe
)
drm/amdgpu: add missed return value set for error case
author
Guchun Chen
<guchun.chen@amd.com>
Mon, 23 Dec 2019 03:40:13 +0000
(11:40 +0800)
committer
Alex Deucher
<alexander.deucher@amd.com>
Mon, 23 Dec 2019 19:59:51 +0000
(14:59 -0500)
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 <guchun.chen@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index
ad593d1
..
96fc538
100644
(file)
--- 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;
}