projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1095af
)
pcmcia: fix ioport size calculation in rsrc_nonstatic
author
Dominik Brodowski
<
[email protected]
>
Thu, 15 Apr 2010 17:01:53 +0000
(19:01 +0200)
committer
Dominik Brodowski
<
[email protected]
>
Thu, 15 Apr 2010 17:01:53 +0000
(19:01 +0200)
Size needs to be calculated after manipulating with the start value.
Reported-by: Komuro <
[email protected]
>
Signed-off-by: Dominik Brodowski <
[email protected]
>
drivers/pcmcia/rsrc_nonstatic.c
patch
|
blob
|
history
diff --git
a/drivers/pcmcia/rsrc_nonstatic.c
b/drivers/pcmcia/rsrc_nonstatic.c
index 1178a823fbc64cfddecf12241cc81cff8751d043..a6eb7b59ba9f805c68c13aacda0b7d886a6a9803 100644
(file)
--- 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
static int adjust_io(struct pcmcia_socket *s, unsigned int action, unsigned long start, unsigned long end)
{
struct socket_data *data = s->resource_data;
- unsigned long size
= end - start + 1
;
+ unsigned long size;
int ret = 0;
#if defined(CONFIG_X86)
@@
-820,6
+820,8
@@
static int adjust_io(struct pcmcia_socket *s, unsigned int action, unsigned long
start = 0x100;
#endif
+ size = end - start + 1;
+
if (end < start)
return -EINVAL;