]> Pileus Git - ~andy/linux/blobdiff - net/irda/af_irda.c
irda: fix locking unbalance in irda_sendmsg
[~andy/linux] / net / irda / af_irda.c
index c9890e25cd4c9681b14f838976a97ed4db560ac7..cc616974a447d582a66c837a09c8c95b1fb8900a 100644 (file)
@@ -1297,8 +1297,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
        /* Note : socket.c set MSG_EOR on SEQPACKET sockets */
        if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR | MSG_CMSG_COMPAT |
                               MSG_NOSIGNAL)) {
-               err = -EINVAL;
-               goto out;
+               return -EINVAL;
        }
 
        lock_sock(sk);