Print this page
5253 kmem_alloc/kmem_zalloc won't fail with KM_SLEEP
5254 getrbuf won't fail with KM_SLEEP
*** 782,795 ****
mutex_exit(&dev->device_lock);
/* allocate storage for ME clients representation */
clients = kmem_zalloc(dev->num_heci_me_clients*
sizeof (struct heci_me_client), KM_SLEEP);
- if (!clients) {
- DBG("memory allocation for ME clients failed.\n");
- return (-ENOMEM);
- }
mutex_enter(&dev->device_lock);
dev->me_clients = clients;
mutex_exit(&dev->device_lock);
--- 782,791 ----
*** 1049,1060 ****
heci_alloc_file_private(struct heci_file *file)
{
struct heci_file_private *priv;
priv = kmem_zalloc(sizeof (struct heci_file_private), KM_SLEEP);
- if (!priv)
- return (NULL);
heci_init_file_private(priv, file);
return (priv);
}
--- 1045,1054 ----
*** 1097,1108 ****
if (file_ext->state != HECI_FILE_DISCONNECTING)
return (0);
priv_cb = kmem_zalloc(sizeof (struct heci_cb_private), KM_SLEEP);
- if (!priv_cb)
- return (-ENOMEM);
LIST_INIT_HEAD(&priv_cb->cb_list);
priv_cb->file_private = file_ext;
priv_cb->major_file_operations = HECI_CLOSE;
mutex_enter(&dev->device_lock);
--- 1091,1100 ----