summaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_legacy.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-02-13 10:20:19 +0100
committerJeff Garzik <jeff@garzik.org>2008-02-15 19:51:12 +0100
commit7a3a16fe7ddf0570e2fcf286d7e244a5e1e16f6a (patch)
treee877fc0bd4ed426d3f7d70bed218cf7d4c5555b1 /drivers/ata/pata_legacy.c
parentata: fix sparse warnings in sata_mv.c (diff)
downloadlinux-7a3a16fe7ddf0570e2fcf286d7e244a5e1e16f6a.tar.xz
linux-7a3a16fe7ddf0570e2fcf286d7e244a5e1e16f6a.zip
pata_legacy: don't call ata_host_detach() after initialization failure
ata_host_detach() detaches an attached port and shouldn't be called on a port which hasn't been attached yet. pata_legacy incorrectly calls ata_host_detach() on unattached port after initialization failure causing oops. Fix it. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Ingo Molnar <mingo@elte.hu> Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_legacy.c')
-rw-r--r--drivers/ata/pata_legacy.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index 6c59969fd50b..d2177f75078a 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -1278,8 +1278,6 @@ static __init int legacy_init_one(struct legacy_probe *probe)
}
}
fail:
- if (host)
- ata_host_detach(host);
platform_device_unregister(pdev);
return ret;
}