diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-04-24 14:50:51 +0800 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2013-05-25 12:32:51 +0200 |
commit | 2639f2bf68e4c1bafafc0feca3e16cdad2333a82 (patch) | |
tree | 5c127537c68641b61a87fcb0e9d75837bca48374 /drivers/gpu/host1x | |
parent | b6f2056f3b259960b0cb6a6cf440b89f2567d586 (diff) | |
download | blackbird-op-linux-2639f2bf68e4c1bafafc0feca3e16cdad2333a82.tar.gz blackbird-op-linux-2639f2bf68e4c1bafafc0feca3e16cdad2333a82.zip |
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: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'drivers/gpu/host1x')
-rw-r--r-- | drivers/gpu/host1x/drm/gr2d.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/host1x/drm/gr2d.c b/drivers/gpu/host1x/drm/gr2d.c index 6a45ae090ee7..aca72fc5e2a2 100644 --- a/drivers/gpu/host1x/drm/gr2d.c +++ b/drivers/gpu/host1x/drm/gr2d.c @@ -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, |