IB/ocrdma: Remove and fix debug prints after allocation failure
authorLeon Romanovsky <leon@kernel.org>
Thu, 3 Nov 2016 14:44:22 +0000 (16:44 +0200)
committerDoug Ledford <dledford@redhat.com>
Sat, 3 Dec 2016 18:12:52 +0000 (13:12 -0500)
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>
drivers/infiniband/hw/ocrdma/ocrdma_hw.c
drivers/infiniband/hw/ocrdma/ocrdma_stats.c

index 67fc0b6857e185ca4b4a17631741c7cac8a69922..12b27e7bc6a7f8761fcc7bd378e22b96bb00c88d 100644 (file)
@@ -1596,10 +1596,9 @@ void ocrdma_alloc_pd_pool(struct ocrdma_dev *dev)
 
        dev->pd_mgr = kzalloc(sizeof(struct ocrdma_pd_resource_mgr),
                              GFP_KERNEL);
-       if (!dev->pd_mgr) {
-               pr_err("%s(%d)Memory allocation failure.\n", __func__, dev->id);
+       if (!dev->pd_mgr)
                return;
-       }
+
        status = ocrdma_mbx_alloc_pd_range(dev);
        if (status) {
                pr_err("%s(%d) Unable to initialize PD pool, using default.\n",
index 8bef09a8c49ff3195ac8c9df9dd01a100a93c6ac..f8e4b0a6486f44f7bf540644e6910abc024cad63 100644 (file)
@@ -84,10 +84,8 @@ bool ocrdma_alloc_stats_resources(struct ocrdma_dev *dev)
 
        /* Alloc debugfs mem */
        mem->debugfs_mem = kzalloc(OCRDMA_MAX_DBGFS_MEM, GFP_KERNEL);
-       if (!mem->debugfs_mem) {
-               pr_err("%s: stats debugfs mem allocation failed\n", __func__);
+       if (!mem->debugfs_mem)
                return false;
-       }
 
        return true;
 }