Print this page
5253 kmem_alloc/kmem_zalloc won't fail with KM_SLEEP
5254 getrbuf won't fail with KM_SLEEP
*** 3122,3139 ****
dev_attr.devacc_attr_version = DDI_DEVICE_ATTR_V0;
dev_attr.devacc_attr_endian_flags = DDI_STRUCTURE_LE_ACC;
dev_attr.devacc_attr_dataorder = DDI_STRICTORDER_ACC;
/* Allocate the TD pool structures */
! if ((info->td_pools = kmem_zalloc(
! (sizeof (uhci_bulk_isoc_td_pool_t) * info->num_pools),
! KM_SLEEP)) == NULL) {
! USB_DPRINTF_L2(PRINT_MASK_ATTA, uhcip->uhci_log_hdl,
! "uhci_alloc_memory_for_tds: alloc td_pools failed");
!
! return (USB_FAILURE);
! }
for (i = 0; i < info->num_pools; i++) {
if (info->num_pools == 1) {
num = num_tds;
} else if (i < (info->num_pools - 1)) {
--- 3122,3133 ----
dev_attr.devacc_attr_version = DDI_DEVICE_ATTR_V0;
dev_attr.devacc_attr_endian_flags = DDI_STRUCTURE_LE_ACC;
dev_attr.devacc_attr_dataorder = DDI_STRICTORDER_ACC;
/* Allocate the TD pool structures */
! info->td_pools = kmem_zalloc((sizeof (uhci_bulk_isoc_td_pool_t) *
! info->num_pools), KM_SLEEP);
for (i = 0; i < info->num_pools; i++) {
if (info->num_pools == 1) {
num = num_tds;
} else if (i < (info->num_pools - 1)) {