From 5601ec9fb04391f3047a7bb59bc410d3fb5e36e8 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Thu, 4 Oct 2012 15:15:48 +0200 Subject: [PATCH] --- yaml --- r: 340945 b: refs/heads/master c: 80e4232ecbc96d01465aee132081daaa2c82e859 h: refs/heads/master i: 340943: 3f54094daa51f1804eca3927ccee5fbffae23280 v: v3 --- [refs] | 2 +- trunk/net/nfc/hci/command.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index dbf41268a892..03b7351106f5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 36b05114d137838508ff132ef33c799a02727e1f +refs/heads/master: 80e4232ecbc96d01465aee132081daaa2c82e859 diff --git a/trunk/net/nfc/hci/command.c b/trunk/net/nfc/hci/command.c index 71c6a7086b8f..e15dd684854b 100644 --- a/trunk/net/nfc/hci/command.c +++ b/trunk/net/nfc/hci/command.c @@ -257,16 +257,16 @@ static u8 nfc_hci_create_pipe(struct nfc_hci_dev *hdev, u8 dest_host, *result = nfc_hci_execute_cmd(hdev, NFC_HCI_ADMIN_PIPE, NFC_HCI_ADM_CREATE_PIPE, (u8 *) ¶ms, sizeof(params), &skb); - if (*result == 0) { - resp = (struct hci_create_pipe_resp *)skb->data; - pipe = resp->pipe; - kfree_skb(skb); + if (*result < 0) + return NFC_HCI_INVALID_PIPE; - pr_debug("pipe created=%d\n", pipe); + resp = (struct hci_create_pipe_resp *)skb->data; + pipe = resp->pipe; + kfree_skb(skb); - return pipe; - } else - return NFC_HCI_INVALID_PIPE; + pr_debug("pipe created=%d\n", pipe); + + return pipe; } static int nfc_hci_delete_pipe(struct nfc_hci_dev *hdev, u8 pipe)