Thread (2 messages) 2 messages, 2 authors, 2012-10-18

Re: [PATCH 08/21] TTY: hci_ldisc, remove invalid check in open

From: Marcel Holtmann <marcel@holtmann.org>
Date: 2012-10-18 20:51:58
Also in: lkml

Hi Jiri,
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 <redacted>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <redacted>
Cc: Johan Hedberg <redacted>
Cc: linux-bluetooth@vger.kernel.org
---
 drivers/bluetooth/hci_ldisc.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
Acked-by: Marcel Holtmann <marcel@holtmann.org>

Regards

Marcel

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help