summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/host/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/tegra/host/dev.c')
-rw-r--r--drivers/video/tegra/host/dev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/tegra/host/dev.c b/drivers/video/tegra/host/dev.c
index 8a5cae35e9a1..2b11929dab3c 100644
--- a/drivers/video/tegra/host/dev.c
+++ b/drivers/video/tegra/host/dev.c
@@ -223,6 +223,9 @@ static ssize_t nvhost_channelwrite(struct file *filp, const char __user *buf,
struct nvhost_submit_hdr_ext *hdr = &priv->hdr;
const char *chname = priv->ch->dev->name;
+ if (!job)
+ return -EIO;
+
while (remaining) {
size_t consumed;
if (!hdr->num_relocs &&