diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-03-25 14:08:06 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 19:22:59 +0300 |
commit | 1f4d4a80fbcb1e09cfb95660bcd2b677ea6d04c1 (patch) | |
tree | 713ba892d072d36eaf13f28096050fae794a1edb /drivers/isdn/i4l | |
parent | daff89f324755f87a060d5125a205c0755811ea9 (diff) | |
download | linux-1f4d4a80fbcb1e09cfb95660bcd2b677ea6d04c1.tar.xz |
[PATCH] i4l/isdn_tty.c: fix a check-after-use
Fix a check-after-use spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/i4l')
-rw-r--r-- | drivers/isdn/i4l/isdn_tty.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index aeaa1db74bd8..3585fb1f3344 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c @@ -2345,12 +2345,15 @@ isdn_tty_at_cout(char *msg, modem_info * info) u_long flags; struct sk_buff *skb = NULL; char *sp = NULL; - int l = strlen(msg); + int l; if (!msg) { printk(KERN_WARNING "isdn_tty: Null-Message in isdn_tty_at_cout\n"); return; } + + l = strlen(msg); + spin_lock_irqsave(&info->readlock, flags); tty = info->tty; if ((info->flags & ISDN_ASYNC_CLOSING) || (!tty)) { |