Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
cbuf->ws = qws;
cbuf->nres = 512;
- cbuf->res_bo = (struct virgl_hw_res **)
- CALLOC(cbuf->nres, sizeof(struct virgl_hw_buf*));
+ cbuf->res_bo = CALLOC(cbuf->nres, sizeof(struct virgl_hw_buf*));
if (!cbuf->res_bo) {
FREE(cbuf);
return NULL;
}
- cbuf->res_hlist = (uint32_t *)malloc(cbuf->nres * sizeof(uint32_t));
+ cbuf->res_hlist = malloc(cbuf->nres * sizeof(uint32_t));
if (!cbuf->res_hlist) {
FREE(cbuf->res_bo);
FREE(cbuf);
return NULL;
cbuf->nres = 512;
- cbuf->res_bo = (struct virgl_hw_res **)
- CALLOC(cbuf->nres, sizeof(struct virgl_hw_buf*));
+ cbuf->res_bo = CALLOC(cbuf->nres, sizeof(struct virgl_hw_buf*));
if (!cbuf->res_bo) {
FREE(cbuf);
return NULL;