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

Commit 884fa4f3 authored by Doug Ledford's avatar Doug Ledford
Browse files

Merge branches 'chelsio', 'debug-cleanup', 'hns' and 'i40iw' into merge-test

Loading
Loading
Loading
Loading
+0 −1
Original line number Original line 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 */
	/* Create new device info */
	port_priv = kzalloc(sizeof *port_priv, GFP_KERNEL);
	port_priv = kzalloc(sizeof *port_priv, GFP_KERNEL);
	if (!port_priv) {
	if (!port_priv) {
		dev_err(&device->dev, "No memory for ib_agent_port_private\n");
		ret = -ENOMEM;
		ret = -ENOMEM;
		goto error1;
		goto error1;
	}
	}
+7 −9
Original line number Original line Diff line number Diff line
@@ -770,12 +770,8 @@ static int _gid_table_setup_one(struct ib_device *ib_dev)
	int err = 0;
	int err = 0;


	table = kcalloc(ib_dev->phys_port_cnt, sizeof(*table), GFP_KERNEL);
	table = kcalloc(ib_dev->phys_port_cnt, sizeof(*table), GFP_KERNEL);

	if (!table)
	if (!table) {
		pr_warn("failed to allocate ib gid cache for %s\n",
			ib_dev->name);
		return -ENOMEM;
		return -ENOMEM;
	}


	for (port = 0; port < ib_dev->phys_port_cnt; port++) {
	for (port = 0; port < ib_dev->phys_port_cnt; port++) {
		u8 rdma_port = port + rdma_start_port(ib_dev);
		u8 rdma_port = port + rdma_start_port(ib_dev);
@@ -1170,14 +1166,13 @@ int ib_cache_setup_one(struct ib_device *device)
					  GFP_KERNEL);
					  GFP_KERNEL);
	if (!device->cache.pkey_cache ||
	if (!device->cache.pkey_cache ||
	    !device->cache.lmc_cache) {
	    !device->cache.lmc_cache) {
		pr_warn("Couldn't allocate cache for %s\n", device->name);
		err = -ENOMEM;
		return -ENOMEM;
		goto free;
	}
	}


	err = gid_table_setup_one(device);
	err = gid_table_setup_one(device);
	if (err)
	if (err)
		/* Allocated memory will be cleaned in the release function */
		goto free;
		return err;


	for (p = 0; p <= rdma_end_port(device) - rdma_start_port(device); ++p)
	for (p = 0; p <= rdma_end_port(device) - rdma_start_port(device); ++p)
		ib_cache_update(device, p + rdma_start_port(device));
		ib_cache_update(device, p + rdma_start_port(device));
@@ -1192,6 +1187,9 @@ int ib_cache_setup_one(struct ib_device *device)


err:
err:
	gid_table_cleanup_one(device);
	gid_table_cleanup_one(device);
free:
	kfree(device->cache.pkey_cache);
	kfree(device->cache.lmc_cache);
	return err;
	return err;
}
}


+1 −4
Original line number Original line 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;
	unsigned long flags;


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


	context->client = client;
	context->client = client;
	context->data   = NULL;
	context->data   = NULL;
+0 −1
Original line number Original line 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,
			kmalloc(IB_FMR_HASH_SIZE * sizeof *pool->cache_bucket,
				GFP_KERNEL);
				GFP_KERNEL);
		if (!pool->cache_bucket) {
		if (!pool->cache_bucket) {
			pr_warn(PFX "Failed to allocate cache in pool\n");
			ret = -ENOMEM;
			ret = -ENOMEM;
			goto out_free_pool;
			goto out_free_pool;
		}
		}
+0 −1
Original line number Original line 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);
	rem_info = kzalloc(sizeof(struct iwpm_remote_info), GFP_ATOMIC);
	if (!rem_info) {
	if (!rem_info) {
		pr_err("%s: Unable to allocate a remote info\n", __func__);
		ret = -ENOMEM;
		ret = -ENOMEM;
		return ret;
		return ret;
	}
	}
Loading