/* Allocate a circular buffer and all associated memory.  */
static struct circ_buf* serial_buf_alloc(void)
/* Allocate a circular buffer and all associated memory.  */
static struct circ_buf* serial_buf_alloc(void)
{
	struct circ_buf *cb;
	cb = kmalloc(sizeof(struct circ_buf), GFP_KERNEL);
	if (cb == NULL)
		return NULL;
	cb->buf = kmalloc(AIRCABLE_BUF_SIZE, GFP_KERNEL);
	if (cb->buf == NULL) {
		kfree(cb);
		return NULL;
	}
	serial_buf_clear(cb);
	return cb;
}