mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-19 15:39:07 +00:00
[PATCH] libata: fix missing classes[] initialization in ata_bus_probe()
ata_bus_probe() didn't initialize classes[] properly with ATA_DEV_UNKNOWN. As ->probe_reset() is allowed to leave @classes alone when no device is present, this results in garbage class values. ATM, the only affected driver is ata_piix. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
75f554bc13
commit
2061a47a9b
@ -1346,6 +1346,9 @@ static int ata_bus_probe(struct ata_port *ap)
|
|||||||
|
|
||||||
/* reset */
|
/* reset */
|
||||||
if (ap->ops->probe_reset) {
|
if (ap->ops->probe_reset) {
|
||||||
|
for (i = 0; i < ATA_MAX_DEVICES; i++)
|
||||||
|
classes[i] = ATA_DEV_UNKNOWN;
|
||||||
|
|
||||||
rc = ap->ops->probe_reset(ap, classes);
|
rc = ap->ops->probe_reset(ap, classes);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
printk("ata%u: reset failed (errno=%d)\n", ap->id, rc);
|
printk("ata%u: reset failed (errno=%d)\n", ap->id, rc);
|
||||||
|
Loading…
Reference in New Issue
Block a user