Hi Tuomas, > > > rfcomm_sock_sendmsg() in net/bluetooth/rfcomm/sock.c. It returns > > > uninitialized variable err, if called with len==0. > > > > > > Simple fix is to initialize err to 0. > > > > this would only hide the real problem. It should only return err if > > the sent is still 0. The return statement is > > > > return sent ? sent : err; > > Yep, exactly. It returns err, which isn't initialized, so it could be > positive. > > Am I missing something? that is really strange. A recent compiler should detect that err can be used uninitialized. How about the attached patch. Does it work for you? Regards Marcel