From: Ralf Baechle Date: Sat, 27 Sep 2008 17:32:16 +0000 (+0200) Subject: Swarm: Fix crash due to missing initialization X-Git-Tag: v2.6.27-rc8~3^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3d977760b9478538821a75dd5eb74d0f2a2b01e3;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/mips/swarm.c b/drivers/ide/mips/swarm.c index badf79fc9e3..39c9ee99585 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) 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));