aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/3c589_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pcmcia/3c589_cs.c')
-rw-r--r--drivers/net/pcmcia/3c589_cs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c
index 549a64558420..0b28d0d8ffa8 100644
--- a/drivers/net/pcmcia/3c589_cs.c
+++ b/drivers/net/pcmcia/3c589_cs.c
@@ -278,9 +278,10 @@ static int tc589_config(struct pcmcia_device *link)
278 if (multi && (j & 0x80)) continue; 278 if (multi && (j & 0x80)) continue;
279 link->io.BasePort1 = j ^ 0x300; 279 link->io.BasePort1 = j ^ 0x300;
280 i = pcmcia_request_io(link, &link->io); 280 i = pcmcia_request_io(link, &link->io);
281 if (i == CS_SUCCESS) break; 281 if (i == 0)
282 break;
282 } 283 }
283 if (i != CS_SUCCESS) { 284 if (i != 0) {
284 cs_error(link, RequestIO, i); 285 cs_error(link, RequestIO, i);
285 goto failed; 286 goto failed;
286 } 287 }
@@ -295,7 +296,7 @@ static int tc589_config(struct pcmcia_device *link)
295 /* The 3c589 has an extra EEPROM for configuration info, including 296 /* The 3c589 has an extra EEPROM for configuration info, including
296 the hardware address. The 3c562 puts the address in the CIS. */ 297 the hardware address. The 3c562 puts the address in the CIS. */
297 tuple.DesiredTuple = 0x88; 298 tuple.DesiredTuple = 0x88;
298 if (pcmcia_get_first_tuple(link, &tuple) == CS_SUCCESS) { 299 if (pcmcia_get_first_tuple(link, &tuple) == 0) {
299 pcmcia_get_tuple_data(link, &tuple); 300 pcmcia_get_tuple_data(link, &tuple);
300 for (i = 0; i < 3; i++) 301 for (i = 0; i < 3; i++)
301 phys_addr[i] = htons(le16_to_cpu(buf[i])); 302 phys_addr[i] = htons(le16_to_cpu(buf[i]));