提交 2639f2bf 编写于 作者: W Wei Yongjun 提交者: Thierry Reding

drm/tegra: fix error return code in gr2d_submit()

Fix to return -ENOENT in the host1x_bo lookup error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
上级 b6f2056f
...@@ -135,8 +135,10 @@ static int gr2d_submit(struct host1x_drm_context *context, ...@@ -135,8 +135,10 @@ static int gr2d_submit(struct host1x_drm_context *context,
goto fail; goto fail;
bo = host1x_bo_lookup(drm, file, cmdbuf.handle); bo = host1x_bo_lookup(drm, file, cmdbuf.handle);
if (!bo) if (!bo) {
err = -ENOENT;
goto fail; goto fail;
}
host1x_job_add_gather(job, bo, cmdbuf.words, cmdbuf.offset); host1x_job_add_gather(job, bo, cmdbuf.words, cmdbuf.offset);
num_cmdbufs--; num_cmdbufs--;
...@@ -158,8 +160,10 @@ static int gr2d_submit(struct host1x_drm_context *context, ...@@ -158,8 +160,10 @@ static int gr2d_submit(struct host1x_drm_context *context,
reloc->cmdbuf = cmdbuf; reloc->cmdbuf = cmdbuf;
reloc->target = target; reloc->target = target;
if (!reloc->target || !reloc->cmdbuf) if (!reloc->target || !reloc->cmdbuf) {
err = -ENOENT;
goto fail; goto fail;
}
} }
err = copy_from_user(job->waitchk, waitchks, err = copy_from_user(job->waitchk, waitchks,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册