Messages in this thread | | | Date | Tue, 4 Apr 2006 16:23:43 -0400 | From | "Dmitry Torokhov" <> | Subject | Re: patch bus_add_device-losing-an-error-return-from-the-probe-method.patch added to gregkh-2.6 tree |
| |
On 4/4/06, gregkh@suse.de <gregkh@suse.de> wrote: > > --- gregkh-2.6.orig/drivers/base/bus.c > +++ gregkh-2.6/drivers/base/bus.c > @@ -372,14 +372,17 @@ int bus_add_device(struct device * dev) > > if (bus) { > pr_debug("bus %s: add device %s\n", bus->name, dev->bus_id); > - device_attach(dev); > + error = device_attach(dev); > + if (error < 0) > + goto exit;
I do not believe that this is correct. The fact that _some_ driver failed to attach to a device does not necessarily mean that device itself does not exist. While this assuption might work for platform devices it won't work for other busses.
As fasr as ALSA goes, if they want to abort loading module if device is not present they will have to separate device probing from final driver binding.
-- Dmitry - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |