Skip to content

Commit

Permalink
drm/radeon/kms: Don't kzalloc memory which is immediately overwritten.
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
  • Loading branch information
Michel Dänzer authored and Dave Airlie committed Sep 15, 2009
1 parent 95a8f1b commit fdd5cac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/radeon/radeon_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fdd5cac

Please sign in to comment.