diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-03 05:18:00 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-22 20:29:45 -0400 |
commit | ffb8da20271bcfb343e299e5f630dab9ccfb6214 (patch) | |
tree | 52a228473ac4cb74726c63c4d3f2fbce8da831ff /drivers/pcmcia/cistpl.c | |
parent | 8567142e87322141f9344d1ab632ccf5190cd0d3 (diff) |
pcmcia: deprecate CS_BAD_HANDLE
CS_BAD_HANDLE means that something went badly wrong: no parameter was passed,
or the paramater passed wasn't the correct one. Therefore, replace it with
-EINVAL.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/cistpl.c')
-rw-r--r-- | drivers/pcmcia/cistpl.c | 8 |
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 | |||
425 | int pccard_get_first_tuple(struct pcmcia_socket *s, unsigned int function, tuple_t *tuple) | 425 | int 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) { |