]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: host: fix handling of submit error
authorKirill Artamonov <kartamonov@nvidia.com>
Wed, 1 May 2013 22:04:08 +0000 (01:04 +0300)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 20:25:02 +0000 (13:25 -0700)
Don't setup cleanup intr if submission fails.

bug 1275382

Signed-off-by: Kirill Artamonov <kartamonov@nvidia.com>
Change-Id: Ie29b638d62efbede925e2bbf822344cff671d270
Reviewed-on: http://git-master/r/224617
Reviewed-by: Ken Adams <kadams@nvidia.com>
drivers/video/tegra/host/t124/t124.c

index f0435423ccb3e21a810e0951584e51257f14a2f6..77b4a6f2200a97f8803653b3c1e08180bceb26c3 100644 (file)
@@ -418,14 +418,16 @@ static int t124_channel_submit_gpfifo(struct nvhost_hwctx *hwctx,
 
        ret = gk20a_submit_channel_gpfifo(hwctx->priv, gpfifo, num_entries,
                                        fence, flags);
-
-       err = nvhost_intr_add_action(&nvhost_get_host(ch->dev)->intr,
-               fence->syncpt_id, fence->value,
-               NVHOST_INTR_ACTION_SUBMIT_COMPLETE, ch,
-               completed_waiter,
-               NULL);
-       WARN(err, "Failed to set submit complete interrupt");
-
+       if (!ret) {
+               err = nvhost_intr_add_action(&nvhost_get_host(ch->dev)->intr,
+                       fence->syncpt_id, fence->value,
+                       NVHOST_INTR_ACTION_SUBMIT_COMPLETE, ch,
+                       completed_waiter,
+                       NULL);
+               WARN(err, "Failed to set submit complete interrupt");
+       } else {
+               kfree(completed_waiter);
+       }
        return ret;
 }