提交 dac670b9 编写于 作者: J Johan Hedberg 提交者: Gustavo Padovan

Bluetooth: Simplify hci_uart_tty_close logic

This patch cleans up and reduces indentation in the hci_uart_tty_close
function.
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
上级 40f10224
......@@ -286,15 +286,17 @@ static int hci_uart_tty_open(struct tty_struct *tty)
static void hci_uart_tty_close(struct tty_struct *tty)
{
struct hci_uart *hu = (void *)tty->disc_data;
struct hci_dev *hdev;
BT_DBG("tty %p", tty);
/* Detach from the tty */
tty->disc_data = NULL;
if (hu) {
struct hci_dev *hdev = hu->hdev;
if (!hu)
return;
hdev = hu->hdev;
if (hdev)
hci_uart_close(hdev);
......@@ -307,7 +309,6 @@ static void hci_uart_tty_close(struct tty_struct *tty)
}
kfree(hu);
}
}
/* hci_uart_tty_wakeup()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册