diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pcmcia/rsrc_nonstatic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c index 1178a823fbc6..a6eb7b59ba9f 100644 --- a/drivers/pcmcia/rsrc_nonstatic.c +++ b/drivers/pcmcia/rsrc_nonstatic.c | |||
@@ -810,7 +810,7 @@ static int adjust_memory(struct pcmcia_socket *s, unsigned int action, unsigned | |||
810 | static int adjust_io(struct pcmcia_socket *s, unsigned int action, unsigned long start, unsigned long end) | 810 | static int adjust_io(struct pcmcia_socket *s, unsigned int action, unsigned long start, unsigned long end) |
811 | { | 811 | { |
812 | struct socket_data *data = s->resource_data; | 812 | struct socket_data *data = s->resource_data; |
813 | unsigned long size = end - start + 1; | 813 | unsigned long size; |
814 | int ret = 0; | 814 | int ret = 0; |
815 | 815 | ||
816 | #if defined(CONFIG_X86) | 816 | #if defined(CONFIG_X86) |
@@ -820,6 +820,8 @@ static int adjust_io(struct pcmcia_socket *s, unsigned int action, unsigned long | |||
820 | start = 0x100; | 820 | start = 0x100; |
821 | #endif | 821 | #endif |
822 | 822 | ||
823 | size = end - start + 1; | ||
824 | |||
823 | if (end < start) | 825 | if (end < start) |
824 | return -EINVAL; | 826 | return -EINVAL; |
825 | 827 | ||