/* Get the buffers needed to deal with boot mode messages. These buffers need to be allocated before the sdio recieve irq is setup.  */
static int i2400m_bm_buf_alloc(struct i2400m *i2400m)
/* Get the buffers needed to deal with boot mode messages. These buffers need to be allocated before the sdio recieve irq is setup.  */
static int i2400m_bm_buf_alloc(struct i2400m *i2400m)
{
	int result;
	result = -ENOMEM;
	i2400m->bm_cmd_buf = kzalloc(I2400M_BM_CMD_BUF_SIZE, GFP_KERNEL);
	if (i2400m->bm_cmd_buf == NULL)
		goto error_bm_cmd_kzalloc;
	i2400m->bm_ack_buf = kzalloc(I2400M_BM_ACK_BUF_SIZE, GFP_KERNEL);
	if (i2400m->bm_ack_buf == NULL)
		goto error_bm_ack_buf_kzalloc;
	return 0;
error_bm_ack_buf_kzalloc:
	kfree(i2400m->bm_cmd_buf);
error_bm_cmd_kzalloc:
	return result;
}