Skip to content

Commit

Permalink
Bluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marcel Holtmann committed Jun 14, 2009
1 parent 1a09718 commit 3c4bdc4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/bluetooth/dtl1_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3c4bdc4

Please sign in to comment.