Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 740c330e authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Doug Ledford
Browse files

IB/ocrdma: Remove and fix 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: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 02d93f8e
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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",
+1 −3
Original line number Diff line number Diff line
@@ -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;
}