Print this page
5253 kmem_alloc/kmem_zalloc won't fail with KM_SLEEP
5254 getrbuf won't fail with KM_SLEEP

@@ -239,16 +239,10 @@
         /* Get semaphore to access Flash Address and Flash Data Registers */
         if (ql_sem_spinlock(qlge, QL_FLASH_SEM_MASK) != DDI_SUCCESS) {
                 return (DDI_FAILURE);
         }
         temp = kmem_zalloc(sector_size, KM_SLEEP);
-        if (temp == NULL) {
-                cmn_err(CE_WARN, "%s(%d): Unable to allocate buffer",
-                    __func__, qlge->instance);
-                ql_sem_unlock(qlge, QL_FLASH_SEM_MASK);
-                return (DDI_FAILURE);
-        }
 
         (void) ql_unprotect_flash(qlge);
 
         get_sector_number(qlge, faddr, &start_block);
         get_sector_number(qlge, faddr + len - 1, &end_block);