projects
/
comedi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e9d1ae
)
serial2002: Slight change to previous commit. If failed to allocate
author
Ian Abbott
<abbotti@mev.co.uk>
Wed, 24 Mar 2010 12:54:35 +0000
(12:54 +0000)
committer
Ian Abbott
<abbotti@mev.co.uk>
Wed, 24 Mar 2010 12:54:35 +0000
(12:54 +0000)
maxdata_list or range_table_list for a subdevice during the 'open' method,
free these for all subdevices as they may be left over from a previous
open.
comedi/drivers/serial2002.c
patch
|
blob
|
history
diff --git
a/comedi/drivers/serial2002.c
b/comedi/drivers/serial2002.c
index cce06d61e972eb21b2fb5e604b17e00cc9cdeb76..7e74b35fa0c422bea2d24bd190cd96deedd6341d 100644
(file)
--- a/
comedi/drivers/serial2002.c
+++ b/
comedi/drivers/serial2002.c
@@
-651,7
+651,7
@@
static int serial_2002_open(comedi_device * dev)
/* Failed to allocate maxdata_list or range_table_list
* for a subdevice that needed it. */
result = -ENOMEM;
- for (
; i >= 0; i--
) {
+ for (
i = 0; i <= 4; i++
) {
comedi_subdevice *s = &dev->subdevices[i];
kfree(s->maxdata_list);