tree 2494fac5df0711f16cd4d49cc25133ea9d99b5e7
parent 67d2c36e901403bb97cb79ddb44d702c3284d0ba
author Greg Kroah-Hartman <[EMAIL PROTECTED]> Thu, 18 Aug 2005 07:33:11 -0700
committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Tue, 06 Sep 2005 06:03:09 -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]>

 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
@@ -156,7 +156,9 @@ static ssize_t driver_unbind(struct devi
                err = count;
-       return err;
+       if (err)
+               return err;
+       return count;
 static DRIVER_ATTR(unbind, S_IWUSR, NULL, driver_unbind);
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