[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060729170402.GA20649@leiferikson.dystopia.lan>
Date: Sat, 29 Jul 2006 19:04:02 +0200
From: Johannes Weiner <hnazfoo@...glemail.com>
To: Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: via sata oops on init
Hi,
On Sat, Jul 29, 2006 at 12:41:15PM -0400, Dave Jones wrote:
> --- linux-2.6/drivers/scsi/libata-core.c~ 2006-07-29 12:35:32.000000000 -0400
> +++ linux-2.6/drivers/scsi/libata-core.c 2006-07-29 12:39:08.000000000 -0400
> @@ -5419,10 +5419,10 @@ int ata_device_add(const struct ata_prob
> unsigned long xfer_mode_mask;
>
> ap = ata_host_add(ent, host_set, i);
> + host_set->ports[i] = ap;
> if (!ap)
> goto err_out;
>
> - host_set->ports[i] = ap;
> xfer_mode_mask =(ap->udma_mask << ATA_SHIFT_UDMA) |
> (ap->mwdma_mask << ATA_SHIFT_MWDMA) |
> (ap->pio_mask << ATA_SHIFT_PIO);
> @@ -5532,6 +5532,8 @@ int ata_device_add(const struct ata_prob
>
> err_out:
> for (i = 0; i < count; i++) {
> + if (!host_set->ports[i])
> + break;
> ata_host_remove(host_set->ports[i], 1);
> scsi_host_put(host_set->ports[i]->host);
> }
You jump into loop just to skip it.
Signed-off-by: Johannes Weiner <hanzfoo@...il.com>
View attachment "libata-core.goto.patch" of type "text/plain" (409 bytes)
Powered by blists - more mailing lists