/* Set up the transmit ring and chain the ring pointers together. Returns zero on success or a negative posix errno code for failure.  */
static int velocity_init_td_ring(struct velocity_info *vptr)
/* Set up the transmit ring and chain the ring pointers together. Returns zero on success or a negative posix errno code for failure.  */
static int velocity_init_td_ring(struct velocity_info *vptr)
{
	int j;
	for (j = 0; j < vptr->tx.numq; j++) {
		vptr->tx.infos[j] = kcalloc(vptr->options.numtx,
					    sizeof(struct velocity_td_info),
					    GFP_KERNEL);
		if (!vptr->tx.infos[j])	{
			while (--j >= 0)
				kfree(vptr->tx.infos[j]);
			return -ENOMEM;
		}
		vptr->tx.tail[j] = vptr->tx.curr[j] = vptr->tx.used[j] = 0;
	}
	return 0;
}