video: tegra: host: fix memory leak in ctx save
Mayuresh Kulkarni [Tue, 17 Jul 2012 10:33:21 +0000 (15:33 +0530)]
- host1x_save_context() explicitly updated the ref count on context
- with the re-factoring of nvhost_job code, nvhost_job_alloc()
takes a ref count on context
- this caused the explicit ref count in host1x_save_context()
redundant and lead to memory leak. hence remove it

Bug 1015924

Change-Id: Id18c74412e8659b60288700972690d1b895de4c1
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: http://git-master/r/116409
(cherry picked from commit c98d0cfbbdacdda8e540b5d9e0d513e279b3b2f5)
Reviewed-on: http://git-master/r/117326
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

drivers/video/tegra/host/host1x/host1x_channel.c

index 9e9fc25..1d02537 100644 (file)
@@ -580,7 +580,6 @@ static int host1x_save_context(struct nvhost_channel *ch)
        }
 
        hwctx_to_save->valid = true;
-       ch->ctxhandler->get(hwctx_to_save);
        ch->cur_ctx = NULL;
        syncpt_id = to_host1x_hwctx_handler(hwctx_to_save->h)->syncpt;