diff options
-rw-r--r-- | drivers/ide/ide.c | 1 | ||||
-rw-r--r-- | drivers/ide/legacy/q40ide.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 3fdab563fec2..f5a60912c271 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -726,6 +726,7 @@ void ide_setup_ports ( hw_regs_t *hw, | |||
726 | { | 726 | { |
727 | int i; | 727 | int i; |
728 | 728 | ||
729 | memset(hw, 0, sizeof(hw_regs_t)); | ||
729 | for (i = 0; i < IDE_NR_PORTS; i++) { | 730 | for (i = 0; i < IDE_NR_PORTS; i++) { |
730 | if (offsets[i] == -1) { | 731 | if (offsets[i] == -1) { |
731 | switch(i) { | 732 | switch(i) { |
diff --git a/drivers/ide/legacy/q40ide.c b/drivers/ide/legacy/q40ide.c index 2a78b792f7fb..434a94faa3b7 100644 --- a/drivers/ide/legacy/q40ide.c +++ b/drivers/ide/legacy/q40ide.c | |||
@@ -80,6 +80,7 @@ void q40_ide_setup_ports ( hw_regs_t *hw, | |||
80 | { | 80 | { |
81 | int i; | 81 | int i; |
82 | 82 | ||
83 | memset(hw, 0, sizeof(hw_regs_t)); | ||
83 | for (i = 0; i < IDE_NR_PORTS; i++) { | 84 | for (i = 0; i < IDE_NR_PORTS; i++) { |
84 | /* BIG FAT WARNING: | 85 | /* BIG FAT WARNING: |
85 | assumption: only DATA port is ever used in 16 bit mode */ | 86 | assumption: only DATA port is ever used in 16 bit mode */ |