aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-06-26 08:36:30 -0700
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-06-26 08:36:30 -0700
commitb82c29d81df0ead8b66041702d1dd88e778ab806 (patch)
treeb84f27dfe6a497c19f84e0419204c3ac600445eb /net/bluetooth/l2cap_core.c
parentBluetooth: Use GFP_KERNEL in mgmt events functions (diff)
parentBluetooth: btmrvl: Do not send vendor events to bluetooth stack (diff)
downloadlinux-dev-b82c29d81df0ead8b66041702d1dd88e778ab806.tar.xz
linux-dev-b82c29d81df0ead8b66041702d1dd88e778ab806.zip
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r--net/bluetooth/l2cap_core.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 4ca88247b7c2..d42dfdc83ebb 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -3278,12 +3278,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