diff options
author | Tilman Schmidt <tilman@imap.cc> | 2010-03-14 12:58:05 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-15 16:00:49 -0700 |
commit | 3a0a3a6b92edf181f849ebd8417122392ba73a96 (patch) | |
tree | 9cbaea368c2a5e90fcf0e2c1c45510da7bfa3cc1 /drivers/isdn | |
parent | bc35b4e347c047fb1c665bb761ddb22482539f7f (diff) | |
download | kernel_samsung_crespo-3a0a3a6b92edf181f849ebd8417122392ba73a96.zip kernel_samsung_crespo-3a0a3a6b92edf181f849ebd8417122392ba73a96.tar.gz kernel_samsung_crespo-3a0a3a6b92edf181f849ebd8417122392ba73a96.tar.bz2 |
gigaset: correct clearing of at_state strings on RING
In RING handling, clear the table of received parameter strings in
a loop like everywhere else, instead of by enumeration which had
already gotten out of sync.
Impact: minor bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Karsten Keil <keil@b1-systems.de>
CC: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/gigaset/ev-layer.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c index c8f89b7..206c380 100644 --- a/drivers/isdn/gigaset/ev-layer.c +++ b/drivers/isdn/gigaset/ev-layer.c @@ -1258,14 +1258,10 @@ static void do_action(int action, struct cardstate *cs, * note that bcs may be NULL if no B channel is free */ at_state2->ConState = 700; - kfree(at_state2->str_var[STR_NMBR]); - at_state2->str_var[STR_NMBR] = NULL; - kfree(at_state2->str_var[STR_ZCPN]); - at_state2->str_var[STR_ZCPN] = NULL; - kfree(at_state2->str_var[STR_ZBC]); - at_state2->str_var[STR_ZBC] = NULL; - kfree(at_state2->str_var[STR_ZHLC]); - at_state2->str_var[STR_ZHLC] = NULL; + for (i = 0; i < STR_NUM; ++i) { + kfree(at_state2->str_var[i]); + at_state2->str_var[i] = NULL; + } at_state2->int_var[VAR_ZCTP] = -1; spin_lock_irqsave(&cs->lock, flags); |