kmem_zalloc with KM_SLEEP will never return NULL

These allocations can never fail.  Leaving the error handling
code here gives the impression they can so it has been removed.

Signed-off-by: luozhengzheng <luo.zhengzheng@zte.com.cn>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #5048
This commit is contained in:
luozhengzheng
2016-08-31 09:32:02 +08:00
committed by Brian Behlendorf
parent 2d96d7aa56
commit ca8587a517
2 changed files with 1 additions and 44 deletions
-2
View File
@@ -426,8 +426,6 @@ zfs_zevent_alloc(void)
zevent_t *ev;
ev = kmem_zalloc(sizeof (zevent_t), KM_SLEEP);
if (ev == NULL)
return (NULL);
list_create(&ev->ev_ze_list, sizeof (zfs_zevent_t),
offsetof(zfs_zevent_t, ze_node));