[media] s5p-mfc: Remove potential uninitialized variable usage
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Wed, 10 Apr 2013 10:17:52 +0000 (07:17 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 14 Apr 2013 18:45:58 +0000 (15:45 -0300)
Make sure mem_info[] array is not used uninitialized. This prevents
following compiler warning:
drivers/media/platform/s5p-mfc/s5p_mfc.c: In function s5p_mfc_probe:
drivers/media/platform/s5p-mfc/s5p_mfc.c:1032:33: warning: mem_info[0] may be used uninitialized in this function [-Wuninitialized]
drivers/media/platform/s5p-mfc/s5p_mfc.c:1021:15: note: mem_info[0] was declared here
drivers/media/platform/s5p-mfc/s5p_mfc.c:1032:33: warning: mem_info[1] may be used uninitialized in this function [-Wuninitialized]
drivers/media/platform/s5p-mfc/s5p_mfc.c:1021:15: note: mem_info[1] was declared here

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/s5p-mfc/s5p_mfc.c

index f608b7761be7f71270583a94c772c00fb537c18d..e810b1abf40e4d534f623f479d0f18d7472272b4 100644 (file)
@@ -1020,7 +1020,7 @@ static void *mfc_get_drv_data(struct platform_device *pdev);
 
 static int s5p_mfc_alloc_memdevs(struct s5p_mfc_dev *dev)
 {
-       unsigned int mem_info[2];
+       unsigned int mem_info[2] = { };
 
        dev->mem_dev_l = devm_kzalloc(&dev->plat_dev->dev,
                        sizeof(struct device), GFP_KERNEL);