netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 3c59x: Don't assign when a comparison is intended
@ 2010-12-25 20:30 Jesper Juhl
  2010-12-25 20:50 ` richard -rw- weinberger
  0 siblings, 1 reply; 5+ messages in thread
From: Jesper Juhl @ 2010-12-25 20:30 UTC (permalink / raw)
  To: netdev; +Cc: vortex, becker, Steffen Klassert, linux-kernel

Hi,

In drivers/net/3c59x.c::vortex_probe1() we have this code:

        if (gendev) {
                if ((pdev = DEVICE_PCI(gendev))) {
                        print_name = pci_name(pdev);
                }

                if ((edev = DEVICE_EISA(gendev))) {
                        print_name = dev_name(&edev->dev);
                }
        }

I believe these assignments were intended to be comparisons.
If I'm correct, then here's a patch to fix that up.


Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 3c59x.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index 0a92436f..db8a80e 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -1110,11 +1110,11 @@ static int __devinit vortex_probe1(struct device *gendev,
 	}
 
 	if (gendev) {
-		if ((pdev = DEVICE_PCI(gendev))) {
+		if ((pdev == DEVICE_PCI(gendev))) {
 			print_name = pci_name(pdev);
 		}
 
-		if ((edev = DEVICE_EISA(gendev))) {
+		if ((edev == DEVICE_EISA(gendev))) {
 			print_name = dev_name(&edev->dev);
 		}
 	}


-- 
Jesper Juhl <jj@chaosbits.net>            http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.


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

end of thread, other threads:[~2010-12-25 22:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-25 20:30 [PATCH] 3c59x: Don't assign when a comparison is intended Jesper Juhl
2010-12-25 20:50 ` richard -rw- weinberger
2010-12-25 20:45   ` Jesper Juhl
2010-12-25 21:00     ` richard -rw- weinberger
2010-12-25 22:17   ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).