Message ID | 1347437735-15041-2-git-send-email-waldemar.rymarkiewicz@tieto.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
diff --git a/net/nfc/hci/shdlc.c b/net/nfc/hci/shdlc.c index fe66cbc..12feb58 100644 --- a/net/nfc/hci/shdlc.c +++ b/net/nfc/hci/shdlc.c @@ -309,7 +309,7 @@ static void nfc_shdlc_connect_complete(struct nfc_shdlc *shdlc, int r) del_timer_sync(&shdlc->connect_timer); - if (r == 0) { + if (r >= 0) { shdlc->ns = 0; shdlc->nr = 0; shdlc->dnr = 0;
Typically, the r argument passed to nfc_shdlc_connect_complete() comes from xmit() cb which returns, in successfull usecase, number of successfully transmited bytes. Therefore, e.g. sending UA frame the shdlc will go into wrong state (DISCONNECTED insted of CONNECTED). Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> --- net/nfc/hci/shdlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)