diff options
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r-- | net/bluetooth/l2cap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 16049de49896..daa7a988d9a6 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -2911,7 +2911,7 @@ static inline int l2cap_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hd | |||
2911 | struct l2cap_chan_list *list = &conn->chan_list; | 2911 | struct l2cap_chan_list *list = &conn->chan_list; |
2912 | struct l2cap_conn_req *req = (struct l2cap_conn_req *) data; | 2912 | struct l2cap_conn_req *req = (struct l2cap_conn_req *) data; |
2913 | struct l2cap_conn_rsp rsp; | 2913 | struct l2cap_conn_rsp rsp; |
2914 | struct sock *parent, *uninitialized_var(sk); | 2914 | struct sock *parent, *sk = NULL; |
2915 | int result, status = L2CAP_CS_NO_INFO; | 2915 | int result, status = L2CAP_CS_NO_INFO; |
2916 | 2916 | ||
2917 | u16 dcid = 0, scid = __le16_to_cpu(req->scid); | 2917 | u16 dcid = 0, scid = __le16_to_cpu(req->scid); |
@@ -3020,7 +3020,7 @@ sendresp: | |||
3020 | L2CAP_INFO_REQ, sizeof(info), &info); | 3020 | L2CAP_INFO_REQ, sizeof(info), &info); |
3021 | } | 3021 | } |
3022 | 3022 | ||
3023 | if (!(l2cap_pi(sk)->conf_state & L2CAP_CONF_REQ_SENT) && | 3023 | if (sk && !(l2cap_pi(sk)->conf_state & L2CAP_CONF_REQ_SENT) && |
3024 | result == L2CAP_CR_SUCCESS) { | 3024 | result == L2CAP_CR_SUCCESS) { |
3025 | u8 buf[128]; | 3025 | u8 buf[128]; |
3026 | l2cap_pi(sk)->conf_state |= L2CAP_CONF_REQ_SENT; | 3026 | l2cap_pi(sk)->conf_state |= L2CAP_CONF_REQ_SENT; |