tree 0b31e27c6007adac51c8e6e3a832badc1d8e2a1a
parent 099d44e869f1886b5eb02a5145ca97b5e4142e28
author Greg KH <[EMAIL PROTECTED]> Thu, 18 Aug 2005 07:33:11 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Thu, 18 Aug 2005 12:02:25 -0700

[PATCH] Fix manual binding infinite loop

Fix for manual binding of drivers to devices.  Problem is if you pass in
a valid device id, but the driver refuses to bind.  Infinite loop as
write() tries to resubmit the data it just sent.

Thanks to Michal Ostrowski <[EMAIL PROTECTED]> for pointing the
problem out.

Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 drivers/base/bus.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/base/bus.c b/drivers/base/bus.c
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -180,7 +180,9 @@ static ssize_t driver_bind(struct device
-       return err;
+       if (err)
+               return err;
+       return count;
 static DRIVER_ATTR(bind, S_IWUSR, NULL, driver_bind);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to