summaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-06-13 11:37:18 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2017-06-23 00:34:18 +0200
commit03036184e9d4a5b2b42a70b66db9455808dd5da9 (patch)
tree7cae87bbf374c9102acb636c0cdc97a25e40e9ff /net/nfc
parenta0323b979f81ad2deb2c8836eab506534891876a (diff)
downloadlinux-03036184e9d4a5b2b42a70b66db9455808dd5da9.tar.bz2
nfc: nci: remove unnecessary null check
Remove unnecessary NULL check for pointer conn_info. conn_info is set in list_for_each_entry() using container_of(), which is never NULL. Addresses-Coverity-ID: 1362349 Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/nci/core.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 9ec8d8736378..c25e9b4179c3 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -73,11 +73,10 @@ int nci_get_conn_info_by_dest_type_params(struct nci_dev *ndev, u8 dest_type,
if (conn_info->dest_type == dest_type) {
if (!params)
return conn_info->conn_id;
- if (conn_info) {
- if (params->id == conn_info->dest_params->id &&
- params->protocol == conn_info->dest_params->protocol)
- return conn_info->conn_id;
- }
+
+ if (params->id == conn_info->dest_params->id &&
+ params->protocol == conn_info->dest_params->protocol)
+ return conn_info->conn_id;
}
}