lkml.org 
[lkml]   [2006]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: via sata oops on init
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-29 19:13    [W:0.030 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site