/* Allocate the to_pool and pool_to arrays. Returns 0 on success or an errno.  */
static int svc_pool_map_alloc_arrays(struct svc_pool_map *m, unsigned int maxpools)
/* Allocate the to_pool and pool_to arrays. Returns 0 on success or an errno.  */
static int svc_pool_map_alloc_arrays(struct svc_pool_map *m, unsigned int maxpools)
{
	m->to_pool = kcalloc(maxpools, sizeof(unsigned int), GFP_KERNEL);
	if (!m->to_pool)
		goto fail;
	m->pool_to = kcalloc(maxpools, sizeof(unsigned int), GFP_KERNEL);
	if (!m->pool_to)
		goto fail_free;
	return 0;
fail_free:
	kfree(m->to_pool);
fail:
	return -ENOMEM;
}