[patch] padata: test correct variable in ->store function

Dan Carpenter
2013-01-26T07:49:46Z

It's testing for ->show but calling ->store().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Static analysis. I don't know if it affects real life.

diff --git a/kernel/padata.c b/kernel/padata.c
index 072f4ee..7ac61c1 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -1013,7 +1013,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;