Commit bbc7d09f authored by Dan Carpenter's avatar Dan Carpenter Committed by Ben Hutchings

EDAC: Test correct variable in ->store function

commit 8024c4c0 upstream.

We're testing for ->show but calling ->store().
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent d027778a
......@@ -257,7 +257,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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment