From: Marcel Holtmann Date: Sun, 6 Jul 2014 13:50:27 +0000 (+0200) Subject: Bluetooth: Enforce providing hdev->send driver callback X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=74292d5ac289ff5ec8b565889aaeab332e709099;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Bluetooth: Enforce providing hdev->send driver callback The hdev->send driver callback is mandatory to be provided by a driver before calling hci_register_dev. So enforce it and return EINVAL in case it is not available. All existing drivers are providing this callback anyway, so this is just an extra sanity check. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg --- diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index b02454ab07ee..623ffe0da4a6 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -3932,7 +3932,7 @@ int hci_register_dev(struct hci_dev *hdev) { int id, error; - if (!hdev->open || !hdev->close) + if (!hdev->open || !hdev->close || !hdev->send) return -EINVAL; /* Do not allow HCI_AMP devices to register at index 0,