aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda/af_irda.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/irda/af_irda.c')
-rw-r--r--net/irda/af_irda.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index cb762c8723ea..50b43c57d5d8 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -45,6 +45,7 @@
45#include <linux/capability.h> 45#include <linux/capability.h>
46#include <linux/module.h> 46#include <linux/module.h>
47#include <linux/types.h> 47#include <linux/types.h>
48#include <linux/smp_lock.h>
48#include <linux/socket.h> 49#include <linux/socket.h>
49#include <linux/sockios.h> 50#include <linux/sockios.h>
50#include <linux/init.h> 51#include <linux/init.h>
@@ -714,6 +715,7 @@ static int irda_getname(struct socket *sock, struct sockaddr *uaddr,
714 struct sock *sk = sock->sk; 715 struct sock *sk = sock->sk;
715 struct irda_sock *self = irda_sk(sk); 716 struct irda_sock *self = irda_sk(sk);
716 717
718 memset(&saddr, 0, sizeof(saddr));
717 if (peer) { 719 if (peer) {
718 if (sk->sk_state != TCP_ESTABLISHED) 720 if (sk->sk_state != TCP_ESTABLISHED)
719 return -ENOTCONN; 721 return -ENOTCONN;