This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/media_tree.git tree:

Subject: [media] v4l: omap_vout: Don't free buffers if they haven't been 
allocated
Author:  Laurent Pinchart <[email protected]>
Date:    Tue Nov 10 08:20:19 2015 -0200

The VRFB buffers are freed when the device is closed even if they
haven't been allocated by a call to VIDIOC_REQBUFS, resulting in a
crash. Fix it by not trying to free buffers that are not allocated.

Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/platform/omap/omap_vout_vrfb.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=b446631c5acfec93df643bdf2d142020ae328ced

diff --git a/drivers/media/platform/omap/omap_vout_vrfb.c 
b/drivers/media/platform/omap/omap_vout_vrfb.c
index c6e2527..b8638e4 100644
--- a/drivers/media/platform/omap/omap_vout_vrfb.c
+++ b/drivers/media/platform/omap/omap_vout_vrfb.c
@@ -79,10 +79,12 @@ void omap_vout_free_vrfb_buffers(struct omap_vout_device 
*vout)
        int j;
 
        for (j = 0; j < VRFB_NUM_BUFS; j++) {
-               omap_vout_free_buffer(vout->smsshado_virt_addr[j],
-                               vout->smsshado_size);
-               vout->smsshado_virt_addr[j] = 0;
-               vout->smsshado_phy_addr[j] = 0;
+               if (vout->smsshado_virt_addr[j]) {
+                       omap_vout_free_buffer(vout->smsshado_virt_addr[j],
+                                             vout->smsshado_size);
+                       vout->smsshado_virt_addr[j] = 0;
+                       vout->smsshado_phy_addr[j] = 0;
+               }
        }
 }
 

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to