diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-06-14 09:24:44 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-06-14 09:40:34 -0400 |
commit | 3c4bdc4bd4af791a72147b6ebc29553808f53cea (patch) | |
tree | 9d6f051578389dcabc176f2a1a8d5225a0aa5a6e /drivers/bluetooth/dtl1_cs.c | |
parent | 1a097181ee8b0c492c021eb3dbaa5f9cd813ad0e (diff) |
Bluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver
The current build shows a warning with the DTL-1 driver:
CC [M] drivers/bluetooth/dtl1_cs.o
drivers/bluetooth/dtl1_cs.c: In function ‘dtl1_hci_send_frame’:
drivers/bluetooth/dtl1_cs.c:396: warning: ‘nsh.type’ may be used uninitialized in this function
Fix this by adding a proper error for unknown packet types.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/dtl1_cs.c')
-rw-r--r-- | drivers/bluetooth/dtl1_cs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index 901bdd95655f..2cc7b3266eaf 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c | |||
@@ -415,6 +415,8 @@ static int dtl1_hci_send_frame(struct sk_buff *skb) | |||
415 | hdev->stat.sco_tx++; | 415 | hdev->stat.sco_tx++; |
416 | nsh.type = 0x83; | 416 | nsh.type = 0x83; |
417 | break; | 417 | break; |
418 | default: | ||
419 | return -EILSEQ; | ||
418 | }; | 420 | }; |
419 | 421 | ||
420 | nsh.zero = 0; | 422 | nsh.zero = 0; |