diff options
Diffstat (limited to 'drivers/gpu/drm/tegra/submit.c')
| -rw-r--r-- | drivers/gpu/drm/tegra/submit.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/tegra/submit.c b/drivers/gpu/drm/tegra/submit.c index 2430fcc97448..3009b8b9e619 100644 --- a/drivers/gpu/drm/tegra/submit.c +++ b/drivers/gpu/drm/tegra/submit.c @@ -71,7 +71,7 @@ gather_bo_pin(struct device *dev, struct host1x_bo *bo, enum dma_data_direction struct host1x_bo_mapping *map; int err; - map = kzalloc(sizeof(*map), GFP_KERNEL); + map = kzalloc_obj(*map); if (!map) return ERR_PTR(-ENOMEM); @@ -80,7 +80,7 @@ gather_bo_pin(struct device *dev, struct host1x_bo *bo, enum dma_data_direction map->direction = direction; map->dev = dev; - map->sgt = kzalloc(sizeof(*map->sgt), GFP_KERNEL); + map->sgt = kzalloc_obj(*map->sgt); if (!map->sgt) { err = -ENOMEM; goto free; @@ -193,7 +193,7 @@ static int submit_copy_gather_data(struct gather_bo **pbo, struct device *dev, return -EINVAL; } - bo = kzalloc(sizeof(*bo), GFP_KERNEL); + bo = kzalloc_obj(*bo); if (!bo) { SUBMIT_ERR(context, "failed to allocate memory for bo info"); return -ENOMEM; @@ -270,7 +270,7 @@ static int submit_process_bufs(struct tegra_drm_context *context, struct gather_ return PTR_ERR(bufs); } - mappings = kcalloc(args->num_bufs, sizeof(*mappings), GFP_KERNEL); + mappings = kzalloc_objs(*mappings, args->num_bufs); if (!mappings) { SUBMIT_ERR(context, "failed to allocate memory for mapping info"); err = -ENOMEM; @@ -560,7 +560,7 @@ int tegra_drm_ioctl_channel_submit(struct drm_device *drm, void *data, if (err) goto unlock; - job_data = kzalloc(sizeof(*job_data), GFP_KERNEL); + job_data = kzalloc_obj(*job_data); if (!job_data) { SUBMIT_ERR(context, "failed to allocate memory for job data"); err = -ENOMEM; |
