Skip to contentSkip to conversation

edac: test correct variable in ->store function

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

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

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

We're testing for ->show but calling ->store().

drivers/edac/edac_pci_sysfs.c +1 -1
index 7684426..e8658e4 100644
@@ -256,7 +256,7 @@ static ssize_t edac_pci_dev_store(struct kobject *kobj,
 	struct edac_pci_dev_attribute *edac_pci_dev;
 	edac_pci_dev = (struct edac_pci_dev_attribute *)attr;
 
-	if (edac_pci_dev->show)
+	if (edac_pci_dev->store)
 		return edac_pci_dev->store(edac_pci_dev->value, buffer, count);
 	return -EIO;
 }
maintainer
#1 lore raw
Quoted 3 lines · Dan Carpenter

We're testing for ->show but calling ->store().

Good catch, applied.

Thanks.

Signature · 5 lines
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--