]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
padata: fix sysfs store callback check
authorThomas Weißschuh <linux@weissschuh.net>
Fri, 27 Dec 2024 22:32:01 +0000 (23:32 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 4 Jan 2025 00:53:47 +0000 (08:53 +0800)
padata_sysfs_store() was copied from padata_sysfs_show() but this check
was not adapted. Today there is no attribute which can fail this
check, but if there is one it may as well be correct.

Fixes: 5e017dc3f8bc ("padata: Added sysfs primitives to padata subsystem")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
kernel/padata.c

index d51bbc76b2279ca3ba51e5d0b0ea528bf0198374..cf63d9bcf4822ea3e8f923c0e11f49ac2197b706 100644 (file)
@@ -970,7 +970,7 @@ static ssize_t padata_sysfs_store(struct kobject *kobj, struct attribute *attr,
 
        pinst = kobj2pinst(kobj);
        pentry = attr2pentry(attr);
-       if (pentry->show)
+       if (pentry->store)
                ret = pentry->store(pinst, attr, buf, count);
 
        return ret;