Message ID | b0965c8c0fb8eb62f3ba50179f7d060c60ce475e.1244986258.git.marcel@holtmann.org |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index 901bdd9..2cc7b32 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) hdev->stat.sco_tx++; nsh.type = 0x83; break; + default: + return -EILSEQ; }; nsh.zero = 0;
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 i n this function Fix this by adding a proper error for unknown packet types. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> --- drivers/bluetooth/dtl1_cs.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)