forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
a0323b979f
commit
03036184e9
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user