BUG? [PATCH] driver core: Add the ability to bind drivers todevices from userspace

From: Michal Ostrowski
Date: Wed Aug 17 2005 - 18:46:11 EST



If a driver's probe function returns -ENXIO or -ENODEV,
driver_probe_device() will translate that to return 0 (comments argue it
is not an error).

Consequently driver_bind() will return 0 resulting in the write
system-call that initiated all of this in returning 0 as well.

If one uses "echo" to write to a "bind" attribute, echo will
continuously call write() trying to write to the attribute and always
get 0 as a result and thus find itself in a loop trying to do the write.

Perhaps the translation of -ENZIO to -ENODEV to success in
driver_probe_device() is not approriate here?

--
Michal Ostrowski

Attachment: pgp00000.pgp
Description: PGP signature