mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 13:22:23 +00:00
[media] vpfe_capture: fix compiler warning
davinci/vpfe_capture.c: In function 'vpfe_probe': davinci/vpfe_capture.c:1992:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] return ret; ^~~ This is indeed correct, so if the kmalloc fails set ret to -ENOMEM. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
ed1f47cc69
commit
1827bdc7b1
@ -1847,8 +1847,10 @@ static int vpfe_probe(struct platform_device *pdev)
|
||||
|
||||
/* Allocate memory for ccdc configuration */
|
||||
ccdc_cfg = kmalloc(sizeof(*ccdc_cfg), GFP_KERNEL);
|
||||
if (!ccdc_cfg)
|
||||
if (!ccdc_cfg) {
|
||||
ret = -ENOMEM;
|
||||
goto probe_free_dev_mem;
|
||||
}
|
||||
|
||||
mutex_lock(&ccdc_lock);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user