projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
183f732
)
Bluetooth: add NULL pointer check in HCI
author
Jun Nie
<njun@marvell.com>
Tue, 7 Dec 2010 06:03:38 +0000
(14:03 +0800)
committer
Gustavo F. Padovan
<padovan@profusion.mobi>
Wed, 8 Dec 2010 15:22:22 +0000
(13:22 -0200)
If we fail to find a hci device pointer in hci_uart, don't try
to deref the NULL one we do have.
Signed-off-by: Jun Nie <njun@marvell.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
drivers/bluetooth/hci_ldisc.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/bluetooth/hci_ldisc.c
b/drivers/bluetooth/hci_ldisc.c
index 720148294e648473a1a82cc0c68f50ac1fd923c3..3c6cabcb7d84b0428cdeae91b3f9a98f2bc85715 100644
(file)
--- a/
drivers/bluetooth/hci_ldisc.c
+++ b/
drivers/bluetooth/hci_ldisc.c
@@
-311,8
+311,10
@@
static void hci_uart_tty_close(struct tty_struct *tty)
if (test_and_clear_bit(HCI_UART_PROTO_SET, &hu->flags)) {
hu->proto->close(hu);
- hci_unregister_dev(hdev);
- hci_free_dev(hdev);
+ if (hdev) {
+ hci_unregister_dev(hdev);
+ hci_free_dev(hdev);
+ }
}
}
}