]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
TTY: hci_ldisc, remove invalid check in open
authorJiri Slaby <jslaby@suse.cz>
Thu, 18 Oct 2012 20:26:34 +0000 (22:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Oct 2012 23:50:53 +0000 (16:50 -0700)
commitf327b340e35b210c936cd109544e672aa7a0e49d
treeee405740220bdf4d97653f7899e6118f71eb03de
parent31e121284f90bf559618330e230b286f969b6b7f
TTY: hci_ldisc, remove invalid check in open

hci_ldisc's open checks if tty_struct->disc_data is set. And if so it
returns with an error. But nothing ensures disc_data to be NULL. And
since ld->ops->open shall be called only once, we do not need the
check at all. So remove it.

Note that this is not an issue now, but n_tty will start using the
disc_data pointer and this invalid 'if' would trigger then rendering
TTYs over BT unusable.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bluetooth/hci_ldisc.c