diff options
-rw-r--r-- | module/zfs/zfs_ioctl.c | 2 | ||||
-rw-r--r-- | module/zfs/zvol.c | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index e1b8543d3..1226b2cb9 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -5136,8 +5136,6 @@ zfsdev_state_init(struct file *filp) return (ENXIO); zs = kmem_zalloc( sizeof(zfsdev_state_t), KM_SLEEP); - if (zs == NULL) - return (ENOMEM); zs->zs_file = filp; zs->zs_minor = minor; diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index b41eeb202..43a7bb69f 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -1214,8 +1214,6 @@ zvol_alloc(dev_t dev, const char *name) int error = 0; zv = kmem_zalloc(sizeof (zvol_state_t), KM_SLEEP); - if (zv == NULL) - goto out; zv->zv_queue = blk_init_queue(zvol_request, &zv->zv_lock); if (zv->zv_queue == NULL) @@ -1267,7 +1265,7 @@ out_queue: blk_cleanup_queue(zv->zv_queue); out_kmem: kmem_free(zv, sizeof (zvol_state_t)); -out: + return NULL; } |