Skip to content

Commit

Permalink
[media] omap3isp: ispqueue: Fix uninitialized variable compiler warnings
Browse files Browse the repository at this point in the history
drivers/media/platform/omap3isp/ispqueue.c:399:18: warning: 'pa' may be
used uninitialized in this function [-Wuninitialized]
This is a false positive but the compiler has no way to know about it,
so initialize the variable to 0.
drivers/media/platform/omap3isp/ispqueue.c:445:6: warning:
'vm_page_prot' may be used uninitialized in this function
[-Wuninitialized]
This is a false positive and the compiler should know better. Use
uninitialized_var().

Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
pinchartl authored and Mauro Carvalho Chehab committed Dec 27, 2012
1 parent 36a495a commit e19bc86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/platform/omap3isp/ispqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ static int isp_video_buffer_prepare_pfnmap(struct isp_video_buffer *buf)
unsigned long this_pfn;
unsigned long start;
unsigned long end;
dma_addr_t pa;
dma_addr_t pa = 0;
int ret = -EFAULT;

start = buf->vbuf.m.userptr;
Expand Down Expand Up @@ -419,7 +419,7 @@ static int isp_video_buffer_prepare_pfnmap(struct isp_video_buffer *buf)
static int isp_video_buffer_prepare_vm_flags(struct isp_video_buffer *buf)
{
struct vm_area_struct *vma;
pgprot_t vm_page_prot;
pgprot_t uninitialized_var(vm_page_prot);
unsigned long start;
unsigned long end;
int ret = -EFAULT;
Expand Down

0 comments on commit e19bc86

Please sign in to comment.