isci: Propagate error from bus_dma_tag_create.

Return error from isci_controller_allocate_memory if bus_dma_tag_create
fails instead of ignoring the error.
This commit is contained in:
John Baldwin 2022-04-06 16:45:28 -07:00
parent b024faffa0
commit bbfec32d15

View File

@ -412,7 +412,6 @@ int isci_controller_allocate_memory(struct ISCI_CONTROLLER *controller)
int error;
device_t device = controller->isci->device;
uint32_t max_segment_size = isci_io_request_get_max_io_size();
uint32_t status = 0;
struct ISCI_MEMORY *uncached_controller_memory =
&controller->uncached_controller_memory;
struct ISCI_MEMORY *cached_controller_memory =
@ -477,13 +476,16 @@ int isci_controller_allocate_memory(struct ISCI_CONTROLLER *controller)
* will enable better performance than creating the DMA maps every time we get
* an I/O.
*/
status = bus_dma_tag_create(bus_get_dma_tag(device), 0x1,
error = bus_dma_tag_create(bus_get_dma_tag(device), 0x1,
ISCI_DMA_BOUNDARY, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR,
NULL, NULL, isci_io_request_get_max_io_size(),
SCI_MAX_SCATTER_GATHER_ELEMENTS, max_segment_size, 0,
busdma_lock_mutex, &controller->lock,
&controller->buffer_dma_tag);
if (error != 0)
return (error);
sci_pool_initialize(controller->request_pool);
virtual_address = request_memory->virtual_address;