--- linux-2.5.58/drivers/base/bus.c 2003-01-13 21:58:25.000000000 -0800 +++ linux/drivers/base/bus.c 2003-01-15 02:09:48.000000000 -0800 @@ -283,28 +326,28 @@ * for each pair. If a compatible pair is found, break out and return. */ static int device_attach(struct device * dev) { struct bus_type * bus = dev->bus; struct list_head * entry; - int error = 0; if (dev->driver) { device_bind_driver(dev); return 0; } if (!bus->match) return 0; list_for_each(entry,&bus->drivers.list) { struct device_driver * drv = to_drv(entry); - if (!(error = bus_match(dev,drv))) - break; + int error = bus_match(dev,drv); + if (error != 0 && error != -ENODEV) + return error; } - return error; + return 0; } /** * driver_attach - try to bind driver to devices. * @drv: driver.