[IrDA] af_irda: Silence kernel message in irda_recvmsg_stream
authorOlaf Kirch <olaf.kirch@oracle.com>
Sat, 21 Apr 2007 05:08:15 +0000 (22:08 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:29:28 +0000 (22:29 -0700)
commit6e66aa15d8873ae7418d5afc6476daec466ff93b
tree050b3e9d1533d34fc151ffead0119d13b75fdcb0
parent305f2aa18214555e611ad05e586dd385e64ab665
[IrDA] af_irda: Silence kernel message in irda_recvmsg_stream

This patch silences an IRDA_ASSERT in irda_recvmsg_stream, as described in
http://bugzilla.kernel.org/show_bug.cgi?id=7512 irda_disconnect_indication
would set sk->sk_err to ECONNRESET, and a subsequent call to recvmsg
would print an irritating kernel message and return -1.

When a connected socket is closed by the peer, recvmsg should return 0
rather than an error. This patch fixes this.

Signed-off-by: Olaf Kirch <olaf.kirch@oracle.com>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/irda/af_irda.c