|
@@ -135,8 +135,10 @@ static int gr2d_submit(struct host1x_drm_context *context,
|
|
|
goto fail;
|
|
|
|
|
|
bo = host1x_bo_lookup(drm, file, cmdbuf.handle);
|
|
|
- if (!bo)
|
|
|
+ if (!bo) {
|
|
|
+ err = -ENOENT;
|
|
|
goto fail;
|
|
|
+ }
|
|
|
|
|
|
host1x_job_add_gather(job, bo, cmdbuf.words, cmdbuf.offset);
|
|
|
num_cmdbufs--;
|
|
@@ -158,8 +160,10 @@ static int gr2d_submit(struct host1x_drm_context *context,
|
|
|
reloc->cmdbuf = cmdbuf;
|
|
|
reloc->target = target;
|
|
|
|
|
|
- if (!reloc->target || !reloc->cmdbuf)
|
|
|
+ if (!reloc->target || !reloc->cmdbuf) {
|
|
|
+ err = -ENOENT;
|
|
|
goto fail;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
err = copy_from_user(job->waitchk, waitchks,
|