/* Allocate and set up the receive buffers for each ring slot and assign them to the network adapter.  */
static int velocity_init_rd_ring(struct velocity_info *vptr)
/* Allocate and set up the receive buffers for each ring slot and assign them to the network adapter.  */
static int velocity_init_rd_ring(struct velocity_info *vptr)
{
	int ret = -ENOMEM;
	vptr->rx.info = kcalloc(vptr->options.numrx,
				sizeof(struct velocity_rd_info), GFP_KERNEL);
	if (!vptr->rx.info)
		goto out;
	velocity_init_rx_ring_indexes(vptr);
	if (velocity_rx_refill(vptr) != vptr->options.numrx) {
		VELOCITY_PRT(MSG_LEVEL_ERR, KERN_ERR
			"%s: failed to allocate RX buffer.\n", vptr->dev->name);
		velocity_free_rd_ring(vptr);
		goto out;
	}
	ret = 0;
out:
	return ret;
}