diff mbox series

padata: fix sysfs store callback check

Message ID 20241227-padata-store-v1-1-55713a18bced@weissschuh.net
State New
Headers show
Series padata: fix sysfs store callback check | expand

Commit Message

Thomas Weißschuh Dec. 27, 2024, 10:32 p.m. UTC
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>
---
 kernel/padata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---
base-commit: 8379578b11d5e073792b5db2690faa12effce8e0
change-id: 20241227-padata-store-eac9ea4518a9

Best regards,
diff mbox series

Patch

diff --git a/kernel/padata.c b/kernel/padata.c
index d51bbc76b2279ca3ba51e5d0b0ea528bf0198374..cf63d9bcf4822ea3e8f923c0e11f49ac2197b706 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;