diff options
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/pcmcia_ioctl.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index 738b1ef595a3..9ad18e62658d 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c | |||
@@ -601,12 +601,8 @@ static int ds_ioctl(struct inode * inode, struct file * file, | |||
601 | ret = CS_BAD_ARGS; | 601 | ret = CS_BAD_ARGS; |
602 | else { | 602 | else { |
603 | struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->config.Function); | 603 | struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->config.Function); |
604 | if (p_dev == NULL) | 604 | ret = pccard_get_configuration_info(s, p_dev, &buf->config); |
605 | ret = CS_BAD_ARGS; | 605 | pcmcia_put_dev(p_dev); |
606 | else { | ||
607 | ret = pccard_get_configuration_info(s, p_dev, &buf->config); | ||
608 | pcmcia_put_dev(p_dev); | ||
609 | } | ||
610 | } | 606 | } |
611 | break; | 607 | break; |
612 | case DS_GET_FIRST_TUPLE: | 608 | case DS_GET_FIRST_TUPLE: |
@@ -636,12 +632,8 @@ static int ds_ioctl(struct inode * inode, struct file * file, | |||
636 | ret = CS_BAD_ARGS; | 632 | ret = CS_BAD_ARGS; |
637 | else { | 633 | else { |
638 | struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->status.Function); | 634 | struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->status.Function); |
639 | if (p_dev == NULL) | 635 | ret = pccard_get_status(s, p_dev, &buf->status); |
640 | ret = CS_BAD_ARGS; | 636 | pcmcia_put_dev(p_dev); |
641 | else { | ||
642 | ret = pccard_get_status(s, p_dev, &buf->status); | ||
643 | pcmcia_put_dev(p_dev); | ||
644 | } | ||
645 | } | 637 | } |
646 | break; | 638 | break; |
647 | case DS_VALIDATE_CIS: | 639 | case DS_VALIDATE_CIS: |