diff options
Diffstat (limited to 'drivers/pcmcia/rsrc_nonstatic.c')
| -rw-r--r-- | drivers/pcmcia/rsrc_nonstatic.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c index c42455d20eb6..f9a5c70284b5 100644 --- a/drivers/pcmcia/rsrc_nonstatic.c +++ b/drivers/pcmcia/rsrc_nonstatic.c | |||
| @@ -691,7 +691,7 @@ static int adjust_memory(struct pcmcia_socket *s, unsigned int action, unsigned | |||
| 691 | unsigned long size = end - start + 1; | 691 | unsigned long size = end - start + 1; |
| 692 | int ret = 0; | 692 | int ret = 0; |
| 693 | 693 | ||
| 694 | if (end <= start) | 694 | if (end < start) |
| 695 | return -EINVAL; | 695 | return -EINVAL; |
| 696 | 696 | ||
| 697 | down(&rsrc_sem); | 697 | down(&rsrc_sem); |
| @@ -724,7 +724,7 @@ static int adjust_io(struct pcmcia_socket *s, unsigned int action, unsigned long | |||
| 724 | unsigned long size = end - start + 1; | 724 | unsigned long size = end - start + 1; |
| 725 | int ret = 0; | 725 | int ret = 0; |
| 726 | 726 | ||
| 727 | if (end <= start) | 727 | if (end < start) |
| 728 | return -EINVAL; | 728 | return -EINVAL; |
| 729 | 729 | ||
| 730 | if (end > IO_SPACE_LIMIT) | 730 | if (end > IO_SPACE_LIMIT) |
| @@ -817,7 +817,7 @@ static int nonstatic_autoadd_resources(struct pcmcia_socket *s) | |||
| 817 | 817 | ||
| 818 | /* if we got at least one of IO, and one of MEM, we can be glad and | 818 | /* if we got at least one of IO, and one of MEM, we can be glad and |
| 819 | * activate the PCMCIA subsystem */ | 819 | * activate the PCMCIA subsystem */ |
| 820 | if (done & (IORESOURCE_MEM | IORESOURCE_IO)) | 820 | if (done == (IORESOURCE_MEM | IORESOURCE_IO)) |
| 821 | s->resource_setup_done = 1; | 821 | s->resource_setup_done = 1; |
| 822 | 822 | ||
| 823 | return 0; | 823 | return 0; |
| @@ -925,7 +925,7 @@ static ssize_t store_io_db(struct class_device *class_dev, const char *buf, size | |||
| 925 | return -EINVAL; | 925 | return -EINVAL; |
| 926 | } | 926 | } |
| 927 | } | 927 | } |
| 928 | if (end_addr <= start_addr) | 928 | if (end_addr < start_addr) |
| 929 | return -EINVAL; | 929 | return -EINVAL; |
| 930 | 930 | ||
| 931 | ret = adjust_io(s, add, start_addr, end_addr); | 931 | ret = adjust_io(s, add, start_addr, end_addr); |
| @@ -977,7 +977,7 @@ static ssize_t store_mem_db(struct class_device *class_dev, const char *buf, siz | |||
| 977 | return -EINVAL; | 977 | return -EINVAL; |
| 978 | } | 978 | } |
| 979 | } | 979 | } |
| 980 | if (end_addr <= start_addr) | 980 | if (end_addr < start_addr) |
| 981 | return -EINVAL; | 981 | return -EINVAL; |
| 982 | 982 | ||
| 983 | ret = adjust_memory(s, add, start_addr, end_addr); | 983 | ret = adjust_memory(s, add, start_addr, end_addr); |
