Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d65da6ea authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

[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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 67d2c36e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -156,7 +156,9 @@ static ssize_t driver_unbind(struct device_driver *drv,
		device_release_driver(dev);
		err = count;
	}
	if (err)
		return err;
	return count;
}
static DRIVER_ATTR(unbind, S_IWUSR, NULL, driver_unbind);