提交 3c4bdc4b 编写于 作者: M Marcel Holtmann

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: NMarcel Holtmann <marcel@holtmann.org>
上级 1a097181
...@@ -415,6 +415,8 @@ static int dtl1_hci_send_frame(struct sk_buff *skb) ...@@ -415,6 +415,8 @@ static int dtl1_hci_send_frame(struct sk_buff *skb)
hdev->stat.sco_tx++; hdev->stat.sco_tx++;
nsh.type = 0x83; nsh.type = 0x83;
break; break;
default:
return -EILSEQ;
}; };
nsh.zero = 0; nsh.zero = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册