ipwireless: fix potential tty == NULL dereference
commita51f4124e6d69afdfae34a2ff2e580e7bf224ad2
authorDavid Sterba <dsterba@suse.cz>
Tue, 4 Mar 2008 22:28:50 +0000 (4 14:28 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 5 Mar 2008 00:35:13 +0000 (4 16:35 -0800)
tree5db5968bdd88e7db69847604e1efbd46f8dda14f
parent3149be50d3a31df095bcc83d752293da65a37f62
ipwireless: fix potential tty == NULL dereference

The Coverity checker spotted the following inconsequent NULL checking in
drivers/char/pcmcia/ipwireless/network.c:ipwireless_network_packet_received()

if (tty && channel_idx == IPW_CHANNEL_RAS
&& (network->ras_control_lines &
IPW_CONTROL_LINE_DCD) != 0
&& ipwireless_tty_is_modem(tty)) {
...
else
ipwireless_tty_received(tty, data, length);

Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/pcmcia/ipwireless/network.c