ata_device_add fails, calls ata_host_remove with pointers to unitialized
memory.
Signed-off-by: Dave Jones <davej@redhat.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
int irq_line = ent->irq;
ap = ata_port_add(ent, host, i);
+ host->ports[i] = ap;
if (!ap)
goto err_out;
- host->ports[i] = ap;
-
/* dummy? */
if (ent->dummy_port_mask & (1 << i)) {
ata_port_printk(ap, KERN_INFO, "DUMMY\n");