mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-18 22:34:48 +00:00
IB/usnic: Remove superflous parentheses
Signed-off-by: Upinder Malhi <umalhi@cisco.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
parent
248567f793
commit
6a54d9f9a0
@ -470,7 +470,7 @@ static struct usnic_ib_dev *usnic_ib_discover_pf(struct usnic_vnic *vnic)
|
||||
|
||||
us_ibdev = usnic_ib_device_add(parent_pci);
|
||||
if (IS_ERR_OR_NULL(us_ibdev)) {
|
||||
us_ibdev = (us_ibdev) ? us_ibdev : ERR_PTR(-EFAULT);
|
||||
us_ibdev = us_ibdev ? us_ibdev : ERR_PTR(-EFAULT);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -526,7 +526,7 @@ static int usnic_ib_pci_probe(struct pci_dev *pdev,
|
||||
|
||||
vf->vnic = usnic_vnic_alloc(pdev);
|
||||
if (IS_ERR_OR_NULL(vf->vnic)) {
|
||||
err = (vf->vnic ? PTR_ERR(vf->vnic) : -ENOMEM);
|
||||
err = vf->vnic ? PTR_ERR(vf->vnic) : -ENOMEM;
|
||||
usnic_err("Failed to alloc vnic for %s with err %d\n",
|
||||
pci_name(pdev), err);
|
||||
goto out_release_regions;
|
||||
@ -536,7 +536,7 @@ static int usnic_ib_pci_probe(struct pci_dev *pdev,
|
||||
if (IS_ERR_OR_NULL(pf)) {
|
||||
usnic_err("Failed to discover pf of vnic %s with err%ld\n",
|
||||
pci_name(pdev), PTR_ERR(pf));
|
||||
err = (pf ? PTR_ERR(pf) : -EFAULT);
|
||||
err = pf ? PTR_ERR(pf) : -EFAULT;
|
||||
goto out_clean_vnic;
|
||||
}
|
||||
|
||||
|
@ -214,14 +214,14 @@ create_roce_custom_flow(struct usnic_ib_qp_grp *qp_grp,
|
||||
if (IS_ERR_OR_NULL(flow)) {
|
||||
usnic_err("Unable to alloc flow failed with err %ld\n",
|
||||
PTR_ERR(flow));
|
||||
err = (flow) ? PTR_ERR(flow) : -EFAULT;
|
||||
err = flow ? PTR_ERR(flow) : -EFAULT;
|
||||
goto out_unreserve_port;
|
||||
}
|
||||
|
||||
/* Create Flow Handle */
|
||||
qp_flow = kzalloc(sizeof(*qp_flow), GFP_ATOMIC);
|
||||
if (IS_ERR_OR_NULL(qp_flow)) {
|
||||
err = (qp_flow) ? PTR_ERR(qp_flow) : -ENOMEM;
|
||||
err = qp_flow ? PTR_ERR(qp_flow) : -ENOMEM;
|
||||
goto out_dealloc_flow;
|
||||
}
|
||||
qp_flow->flow = flow;
|
||||
@ -289,14 +289,14 @@ create_udp_flow(struct usnic_ib_qp_grp *qp_grp,
|
||||
if (IS_ERR_OR_NULL(flow)) {
|
||||
usnic_err("Unable to alloc flow failed with err %ld\n",
|
||||
PTR_ERR(flow));
|
||||
err = (flow) ? PTR_ERR(flow) : -EFAULT;
|
||||
err = flow ? PTR_ERR(flow) : -EFAULT;
|
||||
goto out_put_sock;
|
||||
}
|
||||
|
||||
/* Create qp_flow */
|
||||
qp_flow = kzalloc(sizeof(*qp_flow), GFP_ATOMIC);
|
||||
if (IS_ERR_OR_NULL(qp_flow)) {
|
||||
err = (qp_flow) ? PTR_ERR(qp_flow) : -ENOMEM;
|
||||
err = qp_flow ? PTR_ERR(qp_flow) : -ENOMEM;
|
||||
goto out_dealloc_flow;
|
||||
}
|
||||
qp_flow->flow = flow;
|
||||
@ -415,7 +415,7 @@ int usnic_ib_qp_grp_modify(struct usnic_ib_qp_grp *qp_grp,
|
||||
qp_flow = create_and_add_flow(qp_grp,
|
||||
trans_spec);
|
||||
if (IS_ERR_OR_NULL(qp_flow)) {
|
||||
status = (qp_flow) ? PTR_ERR(qp_flow) : -EFAULT;
|
||||
status = qp_flow ? PTR_ERR(qp_flow) : -EFAULT;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@ -430,7 +430,7 @@ int usnic_ib_qp_grp_modify(struct usnic_ib_qp_grp *qp_grp,
|
||||
qp_flow = create_and_add_flow(qp_grp,
|
||||
trans_spec);
|
||||
if (IS_ERR_OR_NULL(qp_flow)) {
|
||||
status = (qp_flow) ? PTR_ERR(qp_flow) : -EFAULT;
|
||||
status = qp_flow ? PTR_ERR(qp_flow) : -EFAULT;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@ -543,8 +543,8 @@ alloc_res_chunk_list(struct usnic_vnic *vnic,
|
||||
res_chunk_list[i] = usnic_vnic_get_resources(vnic, res_type,
|
||||
res_cnt, owner_obj);
|
||||
if (IS_ERR_OR_NULL(res_chunk_list[i])) {
|
||||
err = (res_chunk_list[i] ?
|
||||
PTR_ERR(res_chunk_list[i]) : -ENOMEM);
|
||||
err = res_chunk_list[i] ?
|
||||
PTR_ERR(res_chunk_list[i]) : -ENOMEM;
|
||||
usnic_err("Failed to get %s from %s with err %d\n",
|
||||
usnic_vnic_res_type_to_str(res_type),
|
||||
usnic_vnic_pci_name(vnic),
|
||||
@ -697,7 +697,7 @@ usnic_ib_qp_grp_create(struct usnic_fwd_dev *ufdev, struct usnic_ib_vf *vf,
|
||||
if (IS_ERR_OR_NULL(qp_flow)) {
|
||||
usnic_err("Unable to create and add flow with err %ld\n",
|
||||
PTR_ERR(qp_flow));
|
||||
err = (qp_flow) ? PTR_ERR(qp_flow) : -EFAULT;
|
||||
err = qp_flow ? PTR_ERR(qp_flow) : -EFAULT;
|
||||
goto out_qp_grp_vf_unbind;
|
||||
}
|
||||
|
||||
|
@ -495,7 +495,7 @@ struct ib_qp *usnic_ib_create_qp(struct ib_pd *pd,
|
||||
&trans_spec,
|
||||
&res_spec);
|
||||
if (IS_ERR_OR_NULL(qp_grp)) {
|
||||
err = (qp_grp ? PTR_ERR(qp_grp) : -ENOMEM);
|
||||
err = qp_grp ? PTR_ERR(qp_grp) : -ENOMEM;
|
||||
goto out_release_mutex;
|
||||
}
|
||||
|
||||
@ -605,7 +605,7 @@ struct ib_mr *usnic_ib_reg_mr(struct ib_pd *pd, u64 start, u64 length,
|
||||
mr->umem = usnic_uiom_reg_get(to_upd(pd)->umem_pd, start, length,
|
||||
access_flags, 0);
|
||||
if (IS_ERR_OR_NULL(mr->umem)) {
|
||||
err = (mr->umem) ? PTR_ERR(mr->umem) : -EFAULT;
|
||||
err = mr->umem ? PTR_ERR(mr->umem) : -EFAULT;
|
||||
goto err_free;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user