>From 3303ee708f205b5441ca92f4628c195877fbc074 Mon Sep 17 00:00:00 2001
From: Sergio Aguirre <[email protected]>
Date: Tue, 6 Jan 2009 14:17:35 -0600
Subject: [PATCH] OMAP3ISP: Check asignment on vbq before unmapping

This avoids the possible failure when a vbq_release is called when no buffer
has been mapped.

Signed-off-by: Sergio Aguirre <[email protected]>
---
 drivers/media/video/isp/isp.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 drivers/media/video/isp/isp.c

diff --git a/drivers/media/video/isp/isp.c b/drivers/media/video/isp/isp.c
old mode 100644
new mode 100755
index c841bb4..e75e879
--- a/drivers/media/video/isp/isp.c
+++ b/drivers/media/video/isp/isp.c
@@ -1712,8 +1712,10 @@ EXPORT_SYMBOL(isp_vbq_prepare);
  **/
 void isp_vbq_release(struct videobuf_queue *vbq, struct videobuf_buffer *vb)
 {
-       ispmmu_unmap(ispsg.isp_addr_capture[vb->i]);
-       ispsg.isp_addr_capture[vb->i] = (dma_addr_t) NULL;
+       if (ispsg.isp_addr_capture[vb->i]) {
+               ispmmu_unmap(ispsg.isp_addr_capture[vb->i]);
+               ispsg.isp_addr_capture[vb->i] = (dma_addr_t) NULL;
+       }
        return;
 }
 EXPORT_SYMBOL(isp_vbq_release);
-- 
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to