diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2006-06-23 05:04:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:43:00 -0400 |
commit | 2c3e0262e0cb5395fe02cdf27c229ee7414ab0c0 (patch) | |
tree | d375b705880fc70b8dc5029b81b697936f1bbce7 /drivers/ide/ide.c | |
parent | daacf8bc0dd37a6ad3a87d1a667599e15940815e (diff) |
[PATCH] m68k: completely initialize hw_regs_t in ide_setup_ports
ide_setup_ports does not completely initialize the hw_regs_t structure which
can cause random failures, as the structure is often on the stack. None of
the callers expect a partially initialized structure, i.e. none of them do
any setup of their own before calling ide_setup_ports().
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 1 |
1 files changed, 1 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) { |