summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRebecca Schultz Zavin <rebecca@android.com>2010-12-17 15:06:38 -0800
committerRebecca Schultz Zavin <rebecca@android.com>2010-12-17 15:24:18 -0800
commit7e78d3b5edc1bf031125d869fc7537a98c701450 (patch)
treeb2dab4b911c8f5f5a09da6fc262aed6df37b0b9e /drivers
parent7d99fb5c859827ef07fbd5f83f2e7165c2b3b234 (diff)
video: tegra: nvmap: Add logging to some error conditions
Change-Id: I1ec34fd4a6bb21a6d84912a7228c209f459261be Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/tegra/nvmap/nvmap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap.c b/drivers/video/tegra/nvmap/nvmap.c
index 3cf3935e53fb..262f1b9b357d 100644
--- a/drivers/video/tegra/nvmap/nvmap.c
+++ b/drivers/video/tegra/nvmap/nvmap.c
@@ -414,6 +414,13 @@ static int nvmap_validate_get_pin_array(struct nvmap_client *client,
ref = _nvmap_validate_id_locked(client, arr[i].pin_mem);
+ if (!ref)
+ nvmap_warn(client, "falied to validate id\n");
+ else if (!ref->handle)
+ nvmap_warn(client, "id had no associated handle\n");
+ else if (!ref->handle->alloc)
+ nvmap_warn(client, "handle had no allocation\n");
+
if (!ref || !ref->handle || !ref->handle->alloc) {
ret = -EPERM;
break;
@@ -492,6 +499,7 @@ int nvmap_pin_array(struct nvmap_client *client, struct nvmap_handle *gather,
count = nvmap_validate_get_pin_array(client, arr, nr, unique_arr);
if (count < 0) {
mutex_unlock(&client->share->pin_lock);
+ nvmap_warn(client, "failed to validate pin array\n");
return count;
}