linux/net/bluetooth/rfcomm
Peter Hurley fb856e5090 Bluetooth: Cleanup RFCOMM device registration error handling
If RFCOMM tty device registration fails, cleanup by releasing
the tty_port reference to trigger rfcomm_dev destruction
(rather than open-coding it).

The dlc reference release is moved into rfcomm_dev_add(),
which ensures cleanup in both error paths -- ie., if
__rfcomm_dev_add() fails or if tty_port_register_device() fails.

Fixes releasing the module reference if device registration fails.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Tested-By: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2014-02-14 13:39:32 -08:00
..
core.c Bluetooth: Directly close dlc for not yet started RFCOMM session 2014-02-14 13:39:31 -08:00
Kconfig tty: Added a CONFIG_TTY option to allow removal of TTY 2013-01-18 16:15:27 -08:00
Makefile
sock.c Bluetooth: Refuse peer RFCOMM address reading when not connected 2014-02-13 09:51:39 +02:00
tty.c Bluetooth: Cleanup RFCOMM device registration error handling 2014-02-14 13:39:32 -08:00