From: KAMBAROV, ZAUR Date: Wed, 29 Jun 2005 03:45:12 +0000 (-0700) Subject: [PATCH] coverity: tty_ldisc_ref return null check X-Git-Tag: v2.6.13-rc1~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69f63c5c34d0b34ee2cbf10c5ff7fcff0404879e;p=pandora-kernel.git [PATCH] coverity: tty_ldisc_ref return null check We add a check of the return value of tty_ldisc_ref(), which is checked 7 out of 8 times, e.g.: 149 ld = tty_ldisc_ref(tty); 150 if (ld != NULL) { 151 if (ld->set_termios) 152 (ld->set_termios)(tty, &old_termios); 153 tty_ldisc_deref(ld); 154 } This defect was found automatically by Coverity Prevent, a static analysis tool. (akpm: presumably `ld' is never NULL. Oh well) Signed-off-by: Zaur Kambarov Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed