public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] edac: test correct variable in ->store function
@ 2013-01-26  7:49 Dan Carpenter
  2013-01-26 10:05 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-01-26  7:49 UTC (permalink / raw)
  To: Doug Thompson; +Cc: linux-edac, linux-kernel, kernel-janitors

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

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c
index 7684426..e8658e4 100644
--- a/drivers/edac/edac_pci_sysfs.c
+++ b/drivers/edac/edac_pci_sysfs.c
@@ -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;
 }

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] edac: test correct variable in ->store function
  2013-01-26  7:49 [patch] edac: test correct variable in ->store function Dan Carpenter
@ 2013-01-26 10:05 ` Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2013-01-26 10:05 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Doug Thompson, linux-edac, linux-kernel, kernel-janitors

On Sat, Jan 26, 2013 at 10:49:24AM +0300, Dan Carpenter wrote:
> We're testing for ->show but calling ->store().
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Good catch, applied.

Thanks.

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-26 10:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-26  7:49 [patch] edac: test correct variable in ->store function Dan Carpenter
2013-01-26 10:05 ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox