From: Gustavo F. Padovan Date: Mon, 18 Oct 2010 16:25:53 +0000 (-0200) Subject: Bluetooth: fix endianness conversion in L2CAP X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4f8b691c9fb02e72359e71592098c1de3b8ec712;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git Bluetooth: fix endianness conversion in L2CAP Last commit added a wrong endianness conversion. Fixing that. Reported-by: Harvey Harrison Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index b3fb02ab229..cd8f6ea0384 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -2452,11 +2452,11 @@ static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val) break; case 2: - put_unaligned_le16(cpu_to_le16(val), opt->val); + put_unaligned_le16(val, opt->val); break; case 4: - put_unaligned_le32(cpu_to_le32(val), opt->val); + put_unaligned_le32(val, opt->val); break; default: