Commit fdea9fc9 authored by Linus Torvalds's avatar Linus Torvalds

Broken applications do not realize that a zero return

from "write()" is an error condition, and hang retrying.

Return EINVAL in sysfs instead.
parent 6f2a9d7b
......@@ -243,7 +243,7 @@ sysfs_write_file(struct file *file, const char *buf, size_t count, loff_t *ppos)
if (kobj && kobj->subsys)
ops = kobj->subsys->sysfs_ops;
if (!ops || !ops->store)
return 0;
return -EINVAL;
page = (char *)__get_free_page(GFP_KERNEL);
if (!page)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment