drm/amdgpu: signedness bug in amdgpu_cs_parser_init()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 25 Sep 2015 11:36:55 +0000 (14:36 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 29 Sep 2015 17:44:15 +0000 (13:44 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

index 749420f1ea6fbf2bc1417cfd5ea0210cf3c6243d..cb3c274edb0a6b23a9b830f1ca923cf07ccc45f2 100644 (file)
@@ -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)