tty: ipwireless: fix possible NULL dereference
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Wed, 6 Apr 2016 11:25:39 +0000 (12:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Apr 2016 16:26:55 +0000 (09:26 -0700)
commit76bbdcb35ebb0e9c5315c4b249cd883cca9e065d
tree6d9210f89bb437f0cbb7400f4972731451c06f7e
parent9c5895057bfe5d033c65e15d13c7eee4a78cc837
tty: ipwireless: fix possible NULL dereference

The function alloc_ctrl_packet() can fail and return NULL. Incase it
fails print an error message and exit.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Reviewed-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/ipwireless/hardware.c