[PATCH] padata: fix sysfs store callback check

Thomas Weißschuh posted 1 patch 1 year, 4 months ago
kernel/padata.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] padata: fix sysfs store callback check
Posted by Thomas Weißschuh 1 year, 4 months ago
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(-)

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;

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

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>

Re: [PATCH] padata: fix sysfs store callback check
Posted by Daniel Jordan 1 year, 4 months ago
On Fri, Dec 27, 2024 at 11:32:01PM +0100, Thomas Weißschuh wrote:
> 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>

Acked-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Re: [PATCH] padata: fix sysfs store callback check
Posted by Herbert Xu 1 year, 4 months ago
On Fri, Dec 27, 2024 at 11:32:01PM +0100, Thomas Weißschuh wrote:
> 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(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt