|
@@ -170,7 +170,7 @@ static int r600_cs_packet_next_reloc_nomm(struct radeon_cs_parser *p,
|
|
idx, relocs_chunk->length_dw);
|
|
idx, relocs_chunk->length_dw);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
- *cs_reloc = &p->relocs[0];
|
|
|
|
|
|
+ *cs_reloc = p->relocs;
|
|
(*cs_reloc)->lobj.gpu_offset = (u64)relocs_chunk->kdata[idx + 3] << 32;
|
|
(*cs_reloc)->lobj.gpu_offset = (u64)relocs_chunk->kdata[idx + 3] << 32;
|
|
(*cs_reloc)->lobj.gpu_offset |= relocs_chunk->kdata[idx + 0];
|
|
(*cs_reloc)->lobj.gpu_offset |= relocs_chunk->kdata[idx + 0];
|
|
return 0;
|
|
return 0;
|
|
@@ -717,7 +717,7 @@ static int r600_cs_parser_relocs_legacy(struct radeon_cs_parser *p)
|
|
if (p->chunk_relocs_idx == -1) {
|
|
if (p->chunk_relocs_idx == -1) {
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
- p->relocs = kcalloc(1, sizeof(struct radeon_cs_reloc), GFP_KERNEL);
|
|
|
|
|
|
+ p->relocs = kzalloc(sizeof(struct radeon_cs_reloc), GFP_KERNEL);
|
|
if (p->relocs == NULL) {
|
|
if (p->relocs == NULL) {
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
}
|
|
}
|