Bluetooth: hci_intel: add missing tty-device sanity check
authorJohan Hovold <johan@kernel.org>
Wed, 29 Mar 2017 16:15:28 +0000 (18:15 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 12 Apr 2017 20:02:39 +0000 (22:02 +0200)
commitdcb9cfaa5ea9aa0ec08aeb92582ccfe3e4c719a9
treedf31b92dca47e28ce3c146d622b3c35049ab6fff
parent95065a61e9bf25fb85295127fba893200c2bbbd8
Bluetooth: hci_intel: add missing tty-device sanity check

Make sure to check the tty-device pointer before looking up the sibling
platform device to avoid dereferencing a NULL-pointer when the tty is
one end of a Unix98 pty.

Fixes: 74cdad37cd24 ("Bluetooth: hci_intel: Add runtime PM support")
Fixes: 1ab1f239bf17 ("Bluetooth: hci_intel: Add support for platform driver")
Cc: stable <stable@vger.kernel.org> # 4.3
Cc: Loic Poulain <loic.poulain@intel.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_intel.c