diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index 6c41782b3ba0..bc2c62b95493 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c @@ -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);