]> git.neil.brown.name Git - history.git/commitdiff
Broken applications do not realize that a zero return
authorLinus Torvalds <torvalds@home.transmeta.com>
Tue, 19 Nov 2002 02:10:38 +0000 (18:10 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 19 Nov 2002 02:10:38 +0000 (18:10 -0800)
from "write()" is an error condition, and hang retrying.

Return EINVAL in sysfs instead.

fs/sysfs/inode.c

index ad364d6aacb861afd882029876bf7e91f2711fa7..758b72b5060229549c6378d23d2547c4fcc14ab5 100644 (file)
@@ -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)