Skip to content

Commit

Permalink
[media] s5p-mfc: Remove potential uninitialized variable usage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Apr 14, 2013
1 parent abd5085 commit 65fccab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/platform/s5p-mfc/s5p_mfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 65fccab

Please sign in to comment.