[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 <mostrows@watson.ibm.com> for pointing the
problem out.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index ab53832..6966aff 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -156,7 +156,9 @@
 		device_release_driver(dev);
 		err = count;
 	}
-	return err;
+	if (err)
+		return err;
+	return count;
 }
 static DRIVER_ATTR(unbind, S_IWUSR, NULL, driver_unbind);