summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/nes/nes_mgt.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leon@kernel.org>2016-11-03 17:44:19 +0300
committerDoug Ledford <dledford@redhat.com>2016-12-03 21:12:52 +0300
commit2e65835a1ba0607cb212ec687e509ee6c24a68ed (patch)
tree439977ad3d3214bf0471dea91fc3733fa73a3ed1 /drivers/infiniband/hw/nes/nes_mgt.c
parentc40a83b9786e99a78c849f2f33448426bf8fa0f2 (diff)
downloadlinux-2e65835a1ba0607cb212ec687e509ee6c24a68ed.tar.xz
IB/nes: Remove debug prints after allocation failure
The prints after [k|v][m|z|c]alloc() functions are not needed, because in case of failure, allocator will print their internal error prints anyway. Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_mgt.c')
-rw-r--r--drivers/infiniband/hw/nes/nes_mgt.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/nes/nes_mgt.c b/drivers/infiniband/hw/nes/nes_mgt.c
index 416645259b0f..33624f17c347 100644
--- a/drivers/infiniband/hw/nes/nes_mgt.c
+++ b/drivers/infiniband/hw/nes/nes_mgt.c
@@ -320,8 +320,7 @@ static int get_fpdu_info(struct nes_device *nesdev, struct nes_qp *nesqp,
/* Found one */
fpdu_info = kzalloc(sizeof(*fpdu_info), GFP_ATOMIC);
- if (fpdu_info == NULL) {
- nes_debug(NES_DBG_PAU, "Failed to alloc a fpdu_info.\n");
+ if (!fpdu_info) {
rc = -ENOMEM;
goto out;
}
@@ -729,8 +728,7 @@ static int nes_change_quad_hash(struct nes_device *nesdev,
}
qh_chg = kmalloc(sizeof *qh_chg, GFP_ATOMIC);
- if (qh_chg == NULL) {
- nes_debug(NES_DBG_PAU, "Failed to get a cqp_request.\n");
+ if (!qh_chg) {
ret = -ENOMEM;
goto chg_qh_err;
}
@@ -880,10 +878,8 @@ int nes_init_mgt_qp(struct nes_device *nesdev, struct net_device *netdev, struct
/* Allocate space the all mgt QPs once */
mgtvnic = kzalloc(NES_MGT_QP_COUNT * sizeof(struct nes_vnic_mgt), GFP_KERNEL);
- if (mgtvnic == NULL) {
- nes_debug(NES_DBG_INIT, "Unable to allocate memory for mgt structure\n");
+ if (!mgtvnic)
return -ENOMEM;
- }
/* Allocate fragment, RQ, and CQ; Reuse CEQ based on the PCI function */
/* We are not sending from this NIC so sq is not allocated */