[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47B2B653.7020408@gmail.com>
Date: Wed, 13 Feb 2008 18:20:19 +0900
From: Tejun Heo <htejun@...il.com>
To: Ingo Molnar <mingo@...e.hu>
CC: Arjan van de Ven <arjan@...radead.org>,
linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Mark Lord <mlord@...ox.com>, Jeff Garzik <jeff@...zik.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
IDE/ATA development list <linux-ide@...r.kernel.org>
Subject: [libata-dev #upstream-fixes] 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@...il.com>
Cc: Alan Cox <alan@...rguk.ukuu.org.uk>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Arjan van de Ven <arjan@...radead.org>
---
drivers/ata/pata_legacy.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index 333dc15..7383f19 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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists