diff options
Diffstat (limited to 'drivers/gpu/host1x/drm/gr2d.c')
| -rw-r--r-- | drivers/gpu/host1x/drm/gr2d.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/host1x/drm/gr2d.c b/drivers/gpu/host1x/drm/gr2d.c index 6a45ae090ee7..27ffcf15a4b4 100644 --- a/drivers/gpu/host1x/drm/gr2d.c +++ b/drivers/gpu/host1x/drm/gr2d.c | |||
| @@ -84,7 +84,7 @@ static struct host1x_bo *host1x_bo_lookup(struct drm_device *drm, | |||
| 84 | 84 | ||
| 85 | gem = drm_gem_object_lookup(drm, file, handle); | 85 | gem = drm_gem_object_lookup(drm, file, handle); |
| 86 | if (!gem) | 86 | if (!gem) |
| 87 | return 0; | 87 | return NULL; |
| 88 | 88 | ||
| 89 | mutex_lock(&drm->struct_mutex); | 89 | mutex_lock(&drm->struct_mutex); |
| 90 | drm_gem_object_unreference(gem); | 90 | drm_gem_object_unreference(gem); |
| @@ -135,8 +135,10 @@ static int gr2d_submit(struct host1x_drm_context *context, | |||
| 135 | goto fail; | 135 | goto fail; |
| 136 | 136 | ||
| 137 | bo = host1x_bo_lookup(drm, file, cmdbuf.handle); | 137 | bo = host1x_bo_lookup(drm, file, cmdbuf.handle); |
| 138 | if (!bo) | 138 | if (!bo) { |
| 139 | err = -ENOENT; | ||
| 139 | goto fail; | 140 | goto fail; |
| 141 | } | ||
| 140 | 142 | ||
| 141 | host1x_job_add_gather(job, bo, cmdbuf.words, cmdbuf.offset); | 143 | host1x_job_add_gather(job, bo, cmdbuf.words, cmdbuf.offset); |
| 142 | num_cmdbufs--; | 144 | num_cmdbufs--; |
| @@ -158,8 +160,10 @@ static int gr2d_submit(struct host1x_drm_context *context, | |||
| 158 | reloc->cmdbuf = cmdbuf; | 160 | reloc->cmdbuf = cmdbuf; |
| 159 | reloc->target = target; | 161 | reloc->target = target; |
| 160 | 162 | ||
| 161 | if (!reloc->target || !reloc->cmdbuf) | 163 | if (!reloc->target || !reloc->cmdbuf) { |
| 164 | err = -ENOENT; | ||
| 162 | goto fail; | 165 | goto fail; |
| 166 | } | ||
| 163 | } | 167 | } |
| 164 | 168 | ||
| 165 | err = copy_from_user(job->waitchk, waitchks, | 169 | err = copy_from_user(job->waitchk, waitchks, |
| @@ -281,7 +285,7 @@ static int gr2d_probe(struct platform_device *pdev) | |||
| 281 | if (!gr2d->channel) | 285 | if (!gr2d->channel) |
| 282 | return -ENOMEM; | 286 | return -ENOMEM; |
| 283 | 287 | ||
| 284 | *syncpts = host1x_syncpt_request(dev, 0); | 288 | *syncpts = host1x_syncpt_request(dev, false); |
| 285 | if (!(*syncpts)) { | 289 | if (!(*syncpts)) { |
| 286 | host1x_channel_free(gr2d->channel); | 290 | host1x_channel_free(gr2d->channel); |
| 287 | return -ENOMEM; | 291 | return -ENOMEM; |
