Print this page
5253 kmem_alloc/kmem_zalloc won't fail with KM_SLEEP
5254 getrbuf won't fail with KM_SLEEP
*** 117,128 ****
int
_nsc_init_raw(int maxdevs)
{
_nsc_raw_files =
kmem_zalloc(sizeof (*_nsc_raw_files) * maxdevs, KM_SLEEP);
- if (!_nsc_raw_files)
- return (ENOMEM);
_nsc_raw_maxdevs = maxdevs;
_nsc_raw_majors = NULL;
mutex_init(&_nsc_raw_lock, NULL, MUTEX_DRIVER, NULL);
--- 117,126 ----
*** 302,316 ****
return (ENXIO);
}
plen = strlen(path) + 1;
spath = kmem_alloc(plen, KM_SLEEP);
- if (spath == NULL) {
- cmn_err(CE_WARN,
- "nskern: unable to alloc memory in _raw_open()");
- return (ENOMEM);
- }
(void) strcpy(spath, path);
/*
* Lookup the vnode to extract the dev_t info,
--- 300,309 ----