IB/usnic: Remove superflous parentheses
Signed-off-by: Upinder Malhi <umalhi@cisco.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c
index d6667a1..3e17c7c 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c
@@ -214,14 +214,14 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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;
}