summaryrefslogtreecommitdiffstats
path: root/module/zfs/fm.c
diff options
context:
space:
mode:
authorluozhengzheng <[email protected]>2016-08-31 09:32:02 +0800
committerBrian Behlendorf <[email protected]>2016-09-01 11:39:45 -0700
commitca8587a5172628e282b5b0ac1b2165b212e35601 (patch)
tree5a898599e2f75ef2d5e8ba121cc39aba1f439548 /module/zfs/fm.c
parent2d96d7aa56ea4a95206478474b2244be67a71853 (diff)
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 <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #5048
Diffstat (limited to 'module/zfs/fm.c')
-rw-r--r--module/zfs/fm.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/module/zfs/fm.c b/module/zfs/fm.c
index 09e7913b9..2a425a740 100644
--- a/module/zfs/fm.c
+++ b/module/zfs/fm.c
@@ -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));