diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/irda/af_irda.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index f8133ff5b081..c95bafa65f5b 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c @@ -1039,8 +1039,11 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr, } /* Check if we have opened a local TSAP */ - if (!self->tsap) - irda_open_tsap(self, LSAP_ANY, addr->sir_name); + if (!self->tsap) { + err = irda_open_tsap(self, LSAP_ANY, addr->sir_name); + if (err) + goto out; + } /* Move to connecting socket, start sending Connect Requests */ sock->state = SS_CONNECTING; |