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

Subject: V4L/DVB: V4L: vpfe_capture - free ccdc_lock when memory allocation 
fails
Author:  Murali Karicheri <m-kariche...@ti.com>
Date:    Mon Mar 1 19:54:02 2010 -0300

This patch fixes a bug in vpfe_probe() that doesn't call mutex_unlock() if 
memory
allocation for ccdc_cfg fails. See also the smatch warning report from Dan
Carpenter that shows this as an issue.

Signed-off-by: Murali Karicheri <m-kariche...@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mche...@redhat.com>

 drivers/media/video/davinci/vpfe_capture.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

---

http://git.linuxtv.org/fixes.git?a=commitdiff;h=98ed17551c019fa9453a1ef0ed684bf361021db9

diff --git a/drivers/media/video/davinci/vpfe_capture.c 
b/drivers/media/video/davinci/vpfe_capture.c
index 885cd54..91f665b 100644
--- a/drivers/media/video/davinci/vpfe_capture.c
+++ b/drivers/media/video/davinci/vpfe_capture.c
@@ -1829,7 +1829,7 @@ static __init int vpfe_probe(struct platform_device *pdev)
        if (NULL == ccdc_cfg) {
                v4l2_err(pdev->dev.driver,
                         "Memory allocation failed for ccdc_cfg\n");
-               goto probe_free_dev_mem;
+               goto probe_free_lock;
        }
 
        strncpy(ccdc_cfg->name, vpfe_cfg->ccdc, 32);
@@ -1981,8 +1981,9 @@ probe_out_video_release:
 probe_out_release_irq:
        free_irq(vpfe_dev->ccdc_irq0, vpfe_dev);
 probe_free_ccdc_cfg_mem:
-       mutex_unlock(&ccdc_lock);
        kfree(ccdc_cfg);
+probe_free_lock:
+       mutex_unlock(&ccdc_lock);
 probe_free_dev_mem:
        kfree(vpfe_dev);
        return ret;

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to