video: tegra: nvmap: fix warnings from nvmap_free_sg_table
Krishna Reddy [Mon, 9 Sep 2013 22:15:25 +0000 (15:15 -0700)]
remove checks for validity of ref and ref->handle as ref memory
may not exist during sgt free.

Change-Id: I07f075c25ec1702a3ea9dbead83ac20b54094b9c
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/272162
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

drivers/video/tegra/nvmap/nvmap.c

index 730d188..3aa03e0 100644 (file)
@@ -900,11 +900,9 @@ void __nvmap_free_sg_table(struct nvmap_client *client,
 void nvmap_free_sg_table(struct nvmap_client *client,
                struct nvmap_handle_ref *ref, struct sg_table *sgt)
 {
-       if (WARN_ON(!virt_addr_valid(ref)) ||
-           WARN_ON(!virt_addr_valid(ref->handle)) ||
-           WARN_ON(!virt_addr_valid(sgt)))
+       if (WARN_ON(!virt_addr_valid(sgt)))
                return;
-       __nvmap_free_sg_table(client, ref->handle, sgt);
+       __nvmap_free_sg_table(NULL, NULL, sgt);
 }
 
 void nvmap_set_nvhost_private(struct nvmap_handle_ref *ref, void *priv,