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

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

IB/core: 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: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 27162432
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -156,7 +156,6 @@ int ib_agent_port_open(struct ib_device *device, int port_num)
	/* Create new device info */
	port_priv = kzalloc(sizeof *port_priv, GFP_KERNEL);
	if (!port_priv) {
		dev_err(&device->dev, "No memory for ib_agent_port_private\n");
		ret = -ENOMEM;
		goto error1;
	}
+1 −4
Original line number Diff line number Diff line
@@ -254,11 +254,8 @@ static int add_client_context(struct ib_device *device, struct ib_client *client
	unsigned long flags;

	context = kmalloc(sizeof *context, GFP_KERNEL);
	if (!context) {
		pr_warn("Couldn't allocate client context for %s/%s\n",
			device->name, client->name);
	if (!context)
		return -ENOMEM;
	}

	context->client = client;
	context->data   = NULL;
+0 −1
Original line number Diff line number Diff line
@@ -247,7 +247,6 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
			kmalloc(IB_FMR_HASH_SIZE * sizeof *pool->cache_bucket,
				GFP_KERNEL);
		if (!pool->cache_bucket) {
			pr_warn(PFX "Failed to allocate cache in pool\n");
			ret = -ENOMEM;
			goto out_free_pool;
		}
+0 −1
Original line number Diff line number Diff line
@@ -604,7 +604,6 @@ int iwpm_remote_info_cb(struct sk_buff *skb, struct netlink_callback *cb)
	}
	rem_info = kzalloc(sizeof(struct iwpm_remote_info), GFP_ATOMIC);
	if (!rem_info) {
		pr_err("%s: Unable to allocate a remote info\n", __func__);
		ret = -ENOMEM;
		return ret;
	}
+4 −8
Original line number Diff line number Diff line
@@ -62,7 +62,6 @@ int iwpm_init(u8 nl_client)
					sizeof(struct hlist_head), GFP_KERNEL);
		if (!iwpm_hash_bucket) {
			ret = -ENOMEM;
			pr_err("%s Unable to create mapinfo hash table\n", __func__);
			goto init_exit;
		}
		iwpm_reminfo_bucket = kzalloc(IWPM_REMINFO_HASH_SIZE *
@@ -70,7 +69,6 @@ int iwpm_init(u8 nl_client)
		if (!iwpm_reminfo_bucket) {
			kfree(iwpm_hash_bucket);
			ret = -ENOMEM;
			pr_err("%s Unable to create reminfo hash table\n", __func__);
			goto init_exit;
		}
	}
@@ -128,10 +126,9 @@ int iwpm_create_mapinfo(struct sockaddr_storage *local_sockaddr,
	if (!iwpm_valid_client(nl_client))
		return ret;
	map_info = kzalloc(sizeof(struct iwpm_mapping_info), GFP_KERNEL);
	if (!map_info) {
		pr_err("%s: Unable to allocate a mapping info\n", __func__);
	if (!map_info)
		return -ENOMEM;
	}

	memcpy(&map_info->local_sockaddr, local_sockaddr,
	       sizeof(struct sockaddr_storage));
	memcpy(&map_info->mapped_sockaddr, mapped_sockaddr,
@@ -309,10 +306,9 @@ struct iwpm_nlmsg_request *iwpm_get_nlmsg_request(__u32 nlmsg_seq,
	unsigned long flags;

	nlmsg_request = kzalloc(sizeof(struct iwpm_nlmsg_request), gfp);
	if (!nlmsg_request) {
		pr_err("%s Unable to allocate a nlmsg_request\n", __func__);
	if (!nlmsg_request)
		return NULL;
	}

	spin_lock_irqsave(&iwpm_nlmsg_req_lock, flags);
	list_add_tail(&nlmsg_request->inprocess_list, &iwpm_nlmsg_req_list);
	spin_unlock_irqrestore(&iwpm_nlmsg_req_lock, flags);
Loading