summaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy
diff options
context:
space:
mode:
authorRoman Zippel2006-06-23 11:04:51 +0200
committerLinus Torvalds2006-06-23 16:43:00 +0200
commit2c3e0262e0cb5395fe02cdf27c229ee7414ab0c0 (patch)
treed375b705880fc70b8dc5029b81b697936f1bbce7 /drivers/ide/legacy
parent[PATCH] move do_suspend_lowlevel to correct segment (diff)
downloadkernel-qcow2-linux-2c3e0262e0cb5395fe02cdf27c229ee7414ab0c0.tar.gz
kernel-qcow2-linux-2c3e0262e0cb5395fe02cdf27c229ee7414ab0c0.tar.xz
kernel-qcow2-linux-2c3e0262e0cb5395fe02cdf27c229ee7414ab0c0.zip
[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/legacy')
-rw-r--r--drivers/ide/legacy/q40ide.c1
1 files changed, 1 insertions, 0 deletions
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,
{
int i;
+ memset(hw, 0, sizeof(hw_regs_t));
for (i = 0; i < IDE_NR_PORTS; i++) {
/* BIG FAT WARNING:
assumption: only DATA port is ever used in 16 bit mode */