]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
drivers/block/DAC960: fix -Wuninitialized warning
authorDanny Kukawka <danny.kukawka@bisect.de>
Fri, 2 Mar 2012 09:48:35 +0000 (10:48 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 2 Mar 2012 09:48:35 +0000 (10:48 +0100)
Set CommandMailbox with memset before use it. Fix for:

drivers/block/DAC960.c: In function ‘DAC960_V1_EnableMemoryMailboxInterface’:
arch/x86/include/asm/io.h:61:1: warning: ‘CommandMailbox.Bytes[12]’
 may be used uninitialized in this function [-Wuninitialized]
drivers/block/DAC960.c:1175:30: note: ‘CommandMailbox.Bytes[12]’
 was declared here

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/DAC960.c

index 487ce64c5493fc84bba2bd6bbe303b369b9f4c78..8db9089127c5dac6d3f4b497e002aa3459af27f6 100644 (file)
@@ -1177,7 +1177,8 @@ static bool DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T
   int TimeoutCounter;
   int i;
 
-  
+  memset(&CommandMailbox, 0, sizeof(DAC960_V1_CommandMailbox_T));
+
   if (pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32)))
        return DAC960_Failure(Controller, "DMA mask out of range");
   Controller->BounceBufferLimit = DMA_BIT_MASK(32);