EDAC: Test correct variable in ->store function
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 26 Jan 2013 07:49:24 +0000 (10:49 +0300)
committerBorislav Petkov <bp@suse.de>
Wed, 30 Jan 2013 10:38:11 +0000 (11:38 +0100)
We're testing for ->show but calling ->store().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Borislav Petkov <bp@suse.de>
drivers/edac/edac_pci_sysfs.c

index dc6e905..0056c4d 100644 (file)
@@ -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;
 }