Commit 03036184 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Samuel Ortiz

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: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent a0323b97
......@@ -73,13 +73,12 @@ 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;
}
}
}
return -EINVAL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment