diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.h b/drivers/gpu/drm/etnaviv/etnaviv_gem.h index d1a7d040ac97f8ddbeda97a7048daa61a1a5b315..dc478f014d29ff494a00356ccc5e5066eb5bbe75 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gem.h +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.h @@ -101,7 +101,6 @@ struct etnaviv_gem_submit_bo { * lasts for the duration of the submit-ioctl. */ struct etnaviv_gem_submit { - struct drm_device *dev; struct etnaviv_gpu *gpu; struct ww_acquire_ctx ticket; struct dma_fence *fence; diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c index 8fa31ab1fb0a4ebff70e89d0379d05d14ac91751..51ed34586c108790200efb5537d87128170bfea2 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c @@ -38,17 +38,13 @@ static struct etnaviv_gem_submit *submit_create(struct drm_device *dev, struct etnaviv_gem_submit *submit; size_t sz = size_vstruct(nr, sizeof(submit->bos[0]), sizeof(*submit)); - submit = kmalloc(sz, GFP_KERNEL | __GFP_NOWARN | __GFP_NORETRY); - if (submit) { - submit->dev = dev; - submit->gpu = gpu; + submit = kzalloc(sz, GFP_KERNEL); + if (!submit) + return NULL; - /* initially, until copy_from_user() and bo lookup succeeds: */ - submit->nr_bos = 0; - submit->fence = NULL; + submit->gpu = gpu; - ww_acquire_init(&submit->ticket, &reservation_ww_class); - } + ww_acquire_init(&submit->ticket, &reservation_ww_class); return submit; }