2008-10-23 23:46:39

by Alexander Beregalov

[permalink] [raw]
Subject: [PATCH] rfcomm/sock.c: fix warning unused variable

rfcomm/sock.c:795: warning: unused variable 'sk'

Signed-off-by: Alexander Beregalov <[email protected]>
---

net/bluetooth/rfcomm/sock.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index 8a972b6..f35e5de 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -792,7 +792,6 @@ static int rfcomm_sock_getsockopt(struct socket *sock, int level, int optname, c

static int rfcomm_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
- struct sock *sk = sock->sk;
int err;

BT_DBG("sk %p cmd %x arg %lx", sk, cmd, arg);
@@ -801,6 +800,7 @@ static int rfcomm_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned lon

if (err == -ENOIOCTLCMD) {
#ifdef CONFIG_BT_RFCOMM_TTY
+ struct sock *sk = sock->sk;
lock_sock(sk);
err = rfcomm_dev_ioctl(sk, cmd, (void __user *) arg);
release_sock(sk);