|
@@ -1314,13 +1314,14 @@ int hidp_connection_add(struct hidp_connadd_req *req,
|
|
{
|
|
{
|
|
struct hidp_session *session;
|
|
struct hidp_session *session;
|
|
struct l2cap_conn *conn;
|
|
struct l2cap_conn *conn;
|
|
- struct l2cap_chan *chan = l2cap_pi(ctrl_sock->sk)->chan;
|
|
|
|
|
|
+ struct l2cap_chan *chan;
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
ret = hidp_verify_sockets(ctrl_sock, intr_sock);
|
|
ret = hidp_verify_sockets(ctrl_sock, intr_sock);
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
|
|
+ chan = l2cap_pi(ctrl_sock->sk)->chan;
|
|
conn = NULL;
|
|
conn = NULL;
|
|
l2cap_chan_lock(chan);
|
|
l2cap_chan_lock(chan);
|
|
if (chan->conn)
|
|
if (chan->conn)
|