From: Thomas Weißschuh Date: Fri, 27 Dec 2024 22:32:01 +0000 (+0100) Subject: padata: fix sysfs store callback check X-Git-Tag: v6.14-rc1~112^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ff6e943bce67d125781fe4780a5d6f072dc44c0;p=thirdparty%2Flinux.git padata: fix sysfs store callback check 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 Signed-off-by: Herbert Xu --- diff --git a/kernel/padata.c b/kernel/padata.c index d51bbc76b2279..cf63d9bcf4822 100644 --- a/kernel/padata.c +++ b/kernel/padata.c @@ -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;