diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2008-09-27 13:32:16 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-09-27 13:32:16 -0400 |
commit | 3d977760b9478538821a75dd5eb74d0f2a2b01e3 (patch) | |
tree | c09535aa83b4f7b617b59f7d4b83fabbf78c502a /drivers | |
parent | 6ef190cc92e33565accff6a320f0e7d90480bfe7 (diff) |
Swarm: Fix crash due to missing initialization
If things are just right this will result in the hws[0]->parent being
passed to ide_host_add() being non-zero and an ooops a little later.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/mips/swarm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ide/mips/swarm.c b/drivers/ide/mips/swarm.c index badf79fc9e3a..39c9ee995857 100644 --- a/drivers/ide/mips/swarm.c +++ b/drivers/ide/mips/swarm.c | |||
@@ -107,6 +107,7 @@ static int __devinit swarm_ide_probe(struct device *dev) | |||
107 | 107 | ||
108 | base = ioremap(offset, size); | 108 | base = ioremap(offset, size); |
109 | 109 | ||
110 | memset(&hw, 0, sizeof(hw)); | ||
110 | for (i = 0; i <= 7; i++) | 111 | for (i = 0; i <= 7; i++) |
111 | hw.io_ports_array[i] = | 112 | hw.io_ports_array[i] = |
112 | (unsigned long)(base + ((0x1f0 + i) << 5)); | 113 | (unsigned long)(base + ((0x1f0 + i) << 5)); |