Hi Gustavo, On Fri, Apr 06, 2012 at 08:23:43PM -0300, Gustavo Padovan wrote: > > --- a/net/bluetooth/a2mp.c > > +++ b/net/bluetooth/a2mp.c > > @@ -65,6 +65,22 @@ static void a2mp_send(struct amp_mgr *mgr, u8 code, u8 ident, u16 len, > > kfree(cmd); > > } > > > > +/* Processing A2MP messages */ > > +static inline int a2mp_command_rej(struct amp_mgr *mgr, struct sk_buff *skb, > > + struct a2mp_cmd *hdr) > > Remove the inline, let the compiler choose it for you. OK > > + struct a2mp_cmd_rej *rej = (struct a2mp_cmd_rej *) skb->data; > > + > > + if (le16_to_cpu(hdr->len) < sizeof(*rej)) > > Isn't != better here, if I understood correctly this has a fixed size. Actually no, it has also Data (0 or more octets): The length and content of the Data field depends on the Reason code. If the reason code is 0x0000 "Command not recognized" no Data field is used. Best regards Andrei Emeltchenko -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html