This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/v4l-dvb.git tree:
Subject: V4L/DVB: davinci: don't return under lock on error path Author: Dan Carpenter <[email protected]> Date: Wed Apr 7 06:21:05 2010 -0300 If the kmalloc() failed for "ccdc_cfg = kmalloc(...);" then we would exit with the lock held. I moved the mutex_lock() below the allocation because it isn't protecting anything in that block and allocations are allocations are sometimes slow. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Vaibhav Hiremath <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> drivers/media/video/davinci/vpfe_capture.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/v4l-dvb.git?a=commitdiff;h=68b83de4bd3cb02b32256bdf8e85aec18c13d0c6 diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index 51f6213..65f4526 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c @@ -1853,7 +1853,6 @@ static __init int vpfe_probe(struct platform_device *pdev) goto probe_free_dev_mem; } - mutex_lock(&ccdc_lock); /* Allocate memory for ccdc configuration */ ccdc_cfg = kmalloc(sizeof(struct ccdc_config), GFP_KERNEL); if (NULL == ccdc_cfg) { @@ -1862,6 +1861,8 @@ static __init int vpfe_probe(struct platform_device *pdev) goto probe_free_dev_mem; } + mutex_lock(&ccdc_lock); + strncpy(ccdc_cfg->name, vpfe_cfg->ccdc, 32); /* Get VINT0 irq resource */ res1 = platform_get_resource(pdev, IORESOURCE_IRQ, 0); _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
