Skip to content

Commit

Permalink
[PATCH] Fix manual binding infinite loop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Kroah-Hartman committed Sep 5, 2005
1 parent 67d2c36 commit d65da6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/base/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ static ssize_t driver_unbind(struct device_driver *drv,
device_release_driver(dev);
err = count;
}
return err;
if (err)
return err;
return count;
}
static DRIVER_ATTR(unbind, S_IWUSR, NULL, driver_unbind);

Expand Down

0 comments on commit d65da6e

Please sign in to comment.