rfcomm_session_close() sets the RFCOMM session state to BT_CLOSED.
However, in multiple places immediately before the function is
called, the RFCOMM session is set to BT_CLOSED. Therefore,
remove these unnecessary state settings.
Signed-off-by: Dean Jenkins <Dean_Jenkins@mentor.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
struct rfcomm_dlc *d;
struct list_head *p, *n;
- BT_DBG("session %p state %ld err %d", s, s->state, err);
-
s->state = BT_CLOSED;
+ BT_DBG("session %p state %ld err %d", s, s->state, err);
+
/* Close all dlcs */
list_for_each_safe(p, n, &s->dlcs) {
d = list_entry(p, struct rfcomm_dlc, list);
else
err = ECONNRESET;
- s->state = BT_CLOSED;
s = rfcomm_session_close(s, err);
}
return s;
else
err = ECONNRESET;
- s->state = BT_CLOSED;
s = rfcomm_session_close(s, err);
}
return s;
break;
case BT_CLOSED:
- s->state = BT_CLOSED;
s = rfcomm_session_close(s, sk->sk_err);
break;
}