Skip to content

Commit

Permalink
Swarm: Fix crash due to missing initialization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ralf Baechle authored and Bartlomiej Zolnierkiewicz committed Sep 27, 2008
1 parent 6ef190c commit 3d97776
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/ide/mips/swarm.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ static int __devinit swarm_ide_probe(struct device *dev)

base = ioremap(offset, size);

memset(&hw, 0, sizeof(hw));
for (i = 0; i <= 7; i++)
hw.io_ports_array[i] =
(unsigned long)(base + ((0x1f0 + i) << 5));
Expand Down

0 comments on commit 3d97776

Please sign in to comment.