diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-09-25 14:36:55 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-09-29 13:44:15 -0400 |
commit | 54313503f9a3c34a9e45aad7654976b7f50b9ae7 (patch) | |
tree | 3213855d50e0b38db5ff42820cf000be211b481a /drivers/gpu/drm/amd | |
parent | fd03420b5624617a708fb9b13634b41b37c22cfa (diff) | |
download | linux-54313503f9a3c34a9e45aad7654976b7f50b9ae7.tar.gz linux-54313503f9a3c34a9e45aad7654976b7f50b9ae7.tar.bz2 linux-54313503f9a3c34a9e45aad7654976b7f50b9ae7.zip |
drm/amdgpu: signedness bug in amdgpu_cs_parser_init()
The "i" variable should be signed or it leads to a crash in the error
handling code.
Fixes: 1d263474c441 ('drm/amdgpu: unwind properly in amdgpu_cs_parser_init()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 749420f1ea6f..cb3c274edb0a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -156,7 +156,8 @@ int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data) uint64_t *chunk_array_user; uint64_t *chunk_array; struct amdgpu_fpriv *fpriv = p->filp->driver_priv; - unsigned size, i; + unsigned size; + int i; int ret; if (cs->in.num_chunks == 0) |