diff mbox series

[net-next] net: nci: remove set-but-not-used variable 'status'

Message ID 20190129064028.7768-1-yuehaibing@huawei.com
State Changes Requested
Delegated to: David Miller
Headers show
Series [net-next] net: nci: remove set-but-not-used variable 'status' | expand

Commit Message

Yue Haibing Jan. 29, 2019, 6:40 a.m. UTC
gcc warning this:
net/nfc/nci/hci.c:373:5:
 warning: variable 'status' set but not used [-Wunused-but-set-variable]

It not used since commit d8cd37ed2fc8 ("NFC: nci: Fix improper
management of HCI return code"), so can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 net/nfc/nci/hci.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Comments

David Miller Jan. 29, 2019, 7:04 a.m. UTC | #1
From: YueHaibing <yuehaibing@huawei.com>
Date: Tue, 29 Jan 2019 14:40:28 +0800

> gcc warning this:
> net/nfc/nci/hci.c:373:5:
>  warning: variable 'status' set but not used [-Wunused-but-set-variable]
> 
> It not used since commit d8cd37ed2fc8 ("NFC: nci: Fix improper
> management of HCI return code"), so can be removed.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

I'll let the wireless/nfc folks pick this up.
diff mbox series

Patch

diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index ddfc52a..4debba8 100644
--- a/net/nfc/nci/hci.c
+++ b/net/nfc/nci/hci.c
@@ -370,17 +370,11 @@  static void nci_hci_resp_received(struct nci_dev *ndev, u8 pipe,
 				  u8 result, struct sk_buff *skb)
 {
 	struct nci_conn_info    *conn_info;
-	u8 status = result;
 
 	conn_info = ndev->hci_dev->conn_info;
-	if (!conn_info) {
-		status = NCI_STATUS_REJECTED;
-		goto exit;
-	}
-
-	conn_info->rx_skb = skb;
+	if (conn_info)
+		conn_info->rx_skb = skb;
 
-exit:
 	nci_req_complete(ndev, NCI_STATUS_OK);
 }