mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-18 09:56:18 +07:00
[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> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
099d44e869
commit
518e654083
@ -180,7 +180,9 @@ static ssize_t driver_bind(struct device_driver *drv,
|
||||
up(&dev->sem);
|
||||
put_device(dev);
|
||||
}
|
||||
return err;
|
||||
if (err)
|
||||
return err;
|
||||
return count;
|
||||
}
|
||||
static DRIVER_ATTR(bind, S_IWUSR, NULL, driver_bind);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user