Print this page
5253 kmem_alloc/kmem_zalloc won't fail with KM_SLEEP
5254 getrbuf won't fail with KM_SLEEP
*** 127,138 ****
if (packed_buf == NULL || packed_sz == 0)
return (DDI_EINVAL);
/* copyin packed nvlist */
! if ((packed = kmem_alloc(packed_sz, KM_SLEEP)) == NULL)
! return (DDI_ENOMEM);
if (copyin(packed_buf, packed, packed_sz) != 0) {
cmn_err(CE_WARN, "pcie_copyin_nvlist: copyin failed.\n");
ret = DDI_FAILURE;
goto copyin_cleanup;
--- 127,137 ----
if (packed_buf == NULL || packed_sz == 0)
return (DDI_EINVAL);
/* copyin packed nvlist */
! packed = kmem_alloc(packed_sz, KM_SLEEP);
if (copyin(packed_buf, packed, packed_sz) != 0) {
cmn_err(CE_WARN, "pcie_copyin_nvlist: copyin failed.\n");
ret = DDI_FAILURE;
goto copyin_cleanup;