Skip to contentSkip to conversation

padata: test correct variable in ->store function

PATCH In review Dan Carpenter 2 participants 2 messages Jan 26, 2013 – Jan 28, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 padata: test correct variable in ->store function

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

---
Static analysis. I don't know if it affects real life.

kernel/padata.c +1 -1
index 072f4ee..7ac61c1 100644
@@ -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;