Skip to content

Commit

Permalink
[PATCH] i4l/isdn_tty.c: fix a check-after-use
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adrian Bunk authored and Linus Torvalds committed Mar 25, 2006
1 parent daff89f commit 1f4d4a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/isdn/i4l/isdn_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 1f4d4a8

Please sign in to comment.