[ide] it8172: incorrect return from it8172_init_one()

From: Alan Cox <alan@lxorguk.ukuu.org.uk>

Several IDE drivers return positive values as errors in the PCI setup
code. Unfortunately the PCI layer considers positive values as success
so the driver skips the device but still claims it and things then go
downhill.

This fixes the IT8172 driver.

From: Francois Romieu <romieu@fr.zoreil.com>

Use -ENODEV instead of -EAGAIN.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent a7766f89
......@@ -270,7 +270,7 @@ static int __devinit it8172_init_one(struct pci_dev *dev, const struct pci_devic
{
if ((!(PCI_FUNC(dev->devfn) & 1) ||
(!((dev->class >> 8) == PCI_CLASS_STORAGE_IDE))))
return 1; /* IT8172 is more than only a IDE controller */
return -ENODEV; /* IT8172 is more than an IDE controller */
ide_setup_pci_device(dev, &it8172_chipsets[id->driver_data]);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment