Bluetooth: Kill set but not used variable 'l2cap_sk' in rfcomm_sock_getsockopt_old()
authorDavid Miller <davem@davemloft.net>
Thu, 19 May 2011 22:09:00 +0000 (18:09 -0400)
committerGustavo F. Padovan <padovan@profusion.mobi>
Wed, 8 Jun 2011 19:58:15 +0000 (16:58 -0300)
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/rfcomm/sock.c

index 386cfaffd4b7569e919c933f89192eeb30cf14e2..bcf077cfd73ee1204d0a5056dff765d016d6bd6d 100644 (file)
@@ -741,7 +741,6 @@ static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, c
 static int rfcomm_sock_getsockopt_old(struct socket *sock, int optname, char __user *optval, int __user *optlen)
 {
        struct sock *sk = sock->sk;
-       struct sock *l2cap_sk;
        struct rfcomm_conninfo cinfo;
        struct l2cap_conn *conn = l2cap_pi(sk)->chan->conn;
        int len, err = 0;
@@ -786,8 +785,6 @@ static int rfcomm_sock_getsockopt_old(struct socket *sock, int optname, char __u
                        break;
                }
 
-               l2cap_sk = rfcomm_pi(sk)->dlc->session->sock->sk;
-
                cinfo.hci_handle = conn->hcon->handle;
                memcpy(cinfo.dev_class, conn->hcon->dev_class, 3);