diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-06-22 14:36:10 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-22 14:36:10 -0400 |
commit | 4e42200cafe0c7a90fc26b82b2088c4f2bcb007a (patch) | |
tree | 387f2a5ee2fc61ed85e15ad9f65184d06f382c12 /net/bluetooth/l2cap_core.c | |
parent | 8633c0846160af0b8cfb983bbccd94ae42922af8 (diff) | |
parent | 931cb03afed7b541392295f3afc4638da32f08a0 (diff) | |
download | blackbird-op-linux-4e42200cafe0c7a90fc26b82b2088c4f2bcb007a.tar.gz blackbird-op-linux-4e42200cafe0c7a90fc26b82b2088c4f2bcb007a.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 8394e3615ef6..4554e80d16a3 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -2915,12 +2915,14 @@ static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) while (len >= L2CAP_CONF_OPT_SIZE) { len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val); - switch (type) { - case L2CAP_CONF_RFC: - if (olen == sizeof(rfc)) - memcpy(&rfc, (void *)val, olen); - goto done; - } + if (type != L2CAP_CONF_RFC) + continue; + + if (olen != sizeof(rfc)) + break; + + memcpy(&rfc, (void *)val, olen); + goto done; } /* Use sane default values in case a misbehaving remote device |