Skip to content

Commit 6ce2a94

Browse files
dalgaafgregkh
authored andcommitted
drivers/block/DAC960: fix -Wuninitialized warning
commit cecd353 upstream. 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 <[email protected]> Signed-off-by: Jens Axboe <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a0bdb13 commit 6ce2a94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/block/DAC960.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,8 @@ static bool DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T
11771177
int TimeoutCounter;
11781178
int i;
11791179

1180-
1180+
memset(&CommandMailbox, 0, sizeof(DAC960_V1_CommandMailbox_T));
1181+
11811182
if (pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32)))
11821183
return DAC960_Failure(Controller, "DMA mask out of range");
11831184
Controller->BounceBufferLimit = DMA_BIT_MASK(32);

0 commit comments

Comments
 (0)