aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/cistpl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/cistpl.c')
-rw-r--r--drivers/pcmcia/cistpl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c
index a0eae81731c5..660e162c502f 100644
--- a/drivers/pcmcia/cistpl.c
+++ b/drivers/pcmcia/cistpl.c
@@ -425,7 +425,7 @@ int pccard_get_next_tuple(struct pcmcia_socket *s, unsigned int func, tuple_t *t
425int pccard_get_first_tuple(struct pcmcia_socket *s, unsigned int function, tuple_t *tuple) 425int pccard_get_first_tuple(struct pcmcia_socket *s, unsigned int function, tuple_t *tuple)
426{ 426{
427 if (!s) 427 if (!s)
428 return CS_BAD_HANDLE; 428 return -EINVAL;
429 if (!(s->state & SOCKET_PRESENT)) 429 if (!(s->state & SOCKET_PRESENT))
430 return -ENODEV; 430 return -ENODEV;
431 tuple->TupleLink = tuple->Flags = 0; 431 tuple->TupleLink = tuple->Flags = 0;
@@ -505,7 +505,7 @@ int pccard_get_next_tuple(struct pcmcia_socket *s, unsigned int function, tuple_
505 int ofs, i, attr; 505 int ofs, i, attr;
506 506
507 if (!s) 507 if (!s)
508 return CS_BAD_HANDLE; 508 return -EINVAL;
509 if (!(s->state & SOCKET_PRESENT)) 509 if (!(s->state & SOCKET_PRESENT))
510 return -ENODEV; 510 return -ENODEV;
511 511
@@ -603,7 +603,7 @@ int pccard_get_tuple_data(struct pcmcia_socket *s, tuple_t *tuple)
603 u_int len; 603 u_int len;
604 604
605 if (!s) 605 if (!s)
606 return CS_BAD_HANDLE; 606 return -EINVAL;
607 607
608 if (tuple->TupleLink < tuple->TupleOffset) 608 if (tuple->TupleLink < tuple->TupleOffset)
609 return CS_NO_MORE_ITEMS; 609 return CS_NO_MORE_ITEMS;
@@ -1457,7 +1457,7 @@ int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, unsigned
1457 int ret, reserved, dev_ok = 0, ident_ok = 0; 1457 int ret, reserved, dev_ok = 0, ident_ok = 0;
1458 1458
1459 if (!s) 1459 if (!s)
1460 return CS_BAD_HANDLE; 1460 return -EINVAL;
1461 1461
1462 tuple = kmalloc(sizeof(*tuple), GFP_KERNEL); 1462 tuple = kmalloc(sizeof(*tuple), GFP_KERNEL);
1463 if (tuple == NULL) { 1463 if (tuple == NULL) {