if (fill_cmd(c, HPSA_GET_RAID_MAP, h, &this_device->raid_map,
sizeof(this_device->raid_map), 0,
scsi3addr, TYPE_CMD)) {
- dev_warn(&h->pdev->dev, "Out of memory in hpsa_get_raid_map()\n");
- rc = -ENOMEM;
- goto out;
+ dev_warn(&h->pdev->dev, "hpsa_get_raid_map fill_cmd failed\n");
+ cmd_free(h, c);
+ return -1;
}
rc = hpsa_scsi_do_simple_cmd_with_retry(h, c,
PCI_DMA_FROMDEVICE, NO_TIMEOUT);
if (iocommand.buf_size > 0) {
buff = kmalloc(iocommand.buf_size, GFP_KERNEL);
if (buff == NULL)
- return -EFAULT;
+ return -ENOMEM;
if (iocommand.Request.Type.Direction & XFER_WRITE) {
/* Copy the data into the buffer we created */
if (copy_from_user(buff, iocommand.buf,
clean_up:
hpsa_free_ioaccel1_cmd_and_bft(h);
- return 1;
+ return -ENOMEM;
}
/* Free ioaccel2 mode command blocks and block fetch table */