Re: via sata oops on init
From: Dave Jones
Date: Sat Jul 29 2006 - 13:08:52 EST
On Sat, Jul 29, 2006 at 07:04:02PM +0200, Johannes Weiner wrote:
> You jump into loop just to skip it.
You have to. Look at the allocation again. It's in a loop.
The first of which may have succeeded. Your patch will introduce
a memory leak.
Dave
> diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
> index 386e5f2..064ee85 100644
> --- a/drivers/scsi/libata-core.c
> +++ b/drivers/scsi/libata-core.c
> @@ -5420,7 +5420,7 @@ int ata_device_add(const struct ata_prob
>
> ap = ata_host_add(ent, host_set, i);
> if (!ap)
> - goto err_out;
> + goto err_free_ret;
>
> host_set->ports[i] = ap;
> xfer_mode_mask =(ap->udma_mask << ATA_SHIFT_UDMA) |
--
http://www.codemonkey.org.uk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/