Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290984
b: refs/heads/master
c: 2f39cdb
h: refs/heads/master
v: v3
  • Loading branch information
Marcel Holtmann authored and Johan Hedberg committed Feb 20, 2012
1 parent 4c9a9bf commit e8a9a81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6fb08dfe8654e399c9bbca34be914e213560b5e
refs/heads/master: 2f39cdb7a270da24532734dfdfd10c490be981c4
6 changes: 6 additions & 0 deletions trunk/net/bluetooth/hci_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,11 @@ static int hci_sock_setsockopt(struct socket *sock, int level, int optname, char

lock_sock(sk);

if (hci_pi(sk)->channel != HCI_CHANNEL_RAW) {
err = -EINVAL;
goto done;
}

switch (optname) {
case HCI_DATA_DIR:
if (get_user(opt, (int __user *)optval)) {
Expand Down Expand Up @@ -663,6 +668,7 @@ static int hci_sock_setsockopt(struct socket *sock, int level, int optname, char
break;
}

done:
release_sock(sk);
return err;
}
Expand Down

0 comments on commit e8a9a81

Please sign in to comment.