aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorJaswinder Singh Rajput <jaswinder@kernel.org>2009-09-12 09:08:49 +0000
committerDavid S. Miller <davem@davemloft.net>2009-09-22 13:59:59 -0700
commit03b88a66c040acb4b770221ca24a609527b47fc5 (patch)
tree0cae69a39246db005e048960d74c1e273434d20a /drivers/net
parent44c852ead55b7450c8cff0dc90a3d48310300210 (diff)
pcmcia: pcnet_cs.c removing useless condition
'if (i < NR_INFO)' will only true if we breaks from 'for (i = 0; i < NR_INFO; i++)' So removing useless 'if (i < NR_INFO)' This also fixed following compilation warning : CC [M] drivers/net/pcmcia/pcnet_cs.o drivers/net/pcmcia/pcnet_cs.c: In function ‘get_hwinfo’: drivers/net/pcmcia/pcnet_cs.c:321: warning: ‘base’ may be used uninitialized in this function Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 97db1c73234..474876c879c 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -340,12 +340,11 @@ static hw_info_t *get_hwinfo(struct pcmcia_device *link)
base = &virt[hw_info[i].offset & (req.Size-1)];
if ((readb(base+0) == hw_info[i].a0) &&
(readb(base+2) == hw_info[i].a1) &&
- (readb(base+4) == hw_info[i].a2))
- break;
- }
- if (i < NR_INFO) {
- for (j = 0; j < 6; j++)
- dev->dev_addr[j] = readb(base + (j<<1));
+ (readb(base+4) == hw_info[i].a2)) {
+ for (j = 0; j < 6; j++)
+ dev->dev_addr[j] = readb(base + (j<<1));
+ break;
+ }
}
iounmap(virt);