drm/radeon/kms: Don't kzalloc memory which is immediately overwritten.
authorMichel Dänzer <daenzer@vmware.com>
Tue, 15 Sep 2009 15:09:33 +0000 (17:09 +0200)
committerDave Airlie <airlied@linux.ie>
Tue, 15 Sep 2009 23:14:59 +0000 (09:14 +1000)
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/gpu/drm/radeon/radeon_cs.c

index a169067efc4e5c3ccc87a57dfd1623d6be514035..b530926a217855cf3336b060e3e0252b3ccd8448 100644 (file)
@@ -145,7 +145,7 @@ int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data)
                cdata = (uint32_t *)(unsigned long)user_chunk.chunk_data;
 
                size = p->chunks[i].length_dw * sizeof(uint32_t);
-               p->chunks[i].kdata = kzalloc(size, GFP_KERNEL);
+               p->chunks[i].kdata = kmalloc(size, GFP_KERNEL);
                if (p->chunks[i].kdata == NULL) {
                        return -ENOMEM;
                }