lkml.org 
[lkml]   [2010]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 3c59x: Don't assign when a comparison is intended
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.



\
 
 \ /
  Last update: 2010-12-25 21:43    [W:0.036 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site