提交 d65da6ea 编写于 作者: G Greg Kroah-Hartman

[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: NGreg Kroah-Hartman <gregkh@suse.de>
上级 67d2c36e
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册