retry_erase((erase_busy_t *)arg, MTD_REQ_TIMEOUT);
}
-static int setup_erase_request(client_handle_t handle, eraseq_entry_t *erase)
+static void setup_erase_request(client_handle_t handle, eraseq_entry_t *erase)
{
erase_busy_t *busy;
region_info_t *info;
else {
erase->State = 1;
busy = kmalloc(sizeof(erase_busy_t), GFP_KERNEL);
- if (!busy)
- return CS_GENERAL_FAILURE;
+ if (!busy) {
+ erase->State = ERASE_FAILED;
+ return;
+ }
busy->erase = erase;
busy->client = handle;
init_timer(&busy->timeout);
retry_erase(busy, 0);
}
}
- return CS_SUCCESS;
} /* setup_erase_request */
/*======================================================================
======================================================================*/
-static int setup_regions(client_handle_t handle, int attr,
+static void setup_regions(client_handle_t handle, int attr,
memory_handle_t *list)
{
int i, code, has_jedec, has_geo;
code = (attr) ? CISTPL_DEVICE_A : CISTPL_DEVICE;
if (read_tuple(handle, code, &device) != CS_SUCCESS)
- return CS_GENERAL_FAILURE;
+ return;
code = (attr) ? CISTPL_JEDEC_A : CISTPL_JEDEC_C;
has_jedec = (read_tuple(handle, code, &jedec) == CS_SUCCESS);
if (has_jedec && (device.ndev != jedec.nid)) {
if ((device.dev[i].type != CISTPL_DTYPE_NULL) &&
(device.dev[i].size != 0)) {
r = kmalloc(sizeof(*r), GFP_KERNEL);
- if (!r)
- return CS_GENERAL_FAILURE;
+ if (!r) {
+ printk(KERN_NOTICE "cs: setup_regions: kmalloc failed!\n");
+ return;
+ }
r->region_magic = REGION_MAGIC;
r->state = 0;
r->dev_info[0] = '\0';
}
offset += device.dev[i].size;
}
- return CS_SUCCESS;
} /* setup_regions */
/*======================================================================
if ((handle->Attributes & INFO_MASTER_CLIENT) &&
(!(s->state & SOCKET_REGION_INFO))) {
- if (setup_regions(handle, 0, &s->c_region) != CS_SUCCESS)
- return CS_GENERAL_FAILURE;
- if (setup_regions(handle, 1, &s->a_region) != CS_SUCCESS)
- return CS_GENERAL_FAILURE;
+ setup_regions(handle, 0, &s->c_region);
+ setup_regions(handle, 1, &s->a_region);
s->state |= SOCKET_REGION_INFO;
}