diff options
Diffstat (limited to 'drivers/video/tegra/host/nvhost_job.c')
-rw-r--r-- | drivers/video/tegra/host/nvhost_job.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/tegra/host/nvhost_job.c b/drivers/video/tegra/host/nvhost_job.c index df7a62d689bc..71f2ab0e751f 100644 --- a/drivers/video/tegra/host/nvhost_job.c +++ b/drivers/video/tegra/host/nvhost_job.c @@ -22,9 +22,10 @@ #include <linux/kref.h> #include <linux/err.h> #include <linux/vmalloc.h> -#include <mach/nvmap.h> +#include <linux/nvmap.h> #include "nvhost_channel.h" #include "nvhost_job.h" +#include "nvhost_hwctx.h" #include "dev.h" /* Magic to use to fill freed handle slots */ @@ -73,7 +74,7 @@ static int alloc_gathers(struct nvhost_job *job, gather_size(num_cmdbufs), 32, NVMAP_HANDLE_CACHEABLE, 0); if (IS_ERR_OR_NULL(job->gather_mem)) { - err = PTR_ERR(job->gather_mem); + err = job->gather_mem ? PTR_ERR(job->gather_mem) : -ENOMEM; job->gather_mem = NULL; goto error; } @@ -82,7 +83,7 @@ static int alloc_gathers(struct nvhost_job *job, /* Map memory to kernel */ job->gathers = nvmap_mmap(job->gather_mem); if (IS_ERR_OR_NULL(job->gathers)) { - err = PTR_ERR(job->gathers); + err = job->gathers ? PTR_ERR(job->gathers) : -ENOMEM; job->gathers = NULL; goto error; } |