From 717641ac09315ef254a234f4b866e92662a691a1 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Mon, 17 Oct 2022 02:18:09 -0400 Subject: [PATCH] Cleanup: zvol_add_clones() should not NULL check dp It is never NULL because we return early if dsl_pool_hold() fails. This caused Coverity to complain. Reviewed-by: Brian Behlendorf Signed-off-by: Richard Yao Closes #14042 --- module/zfs/zvol.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index 2e2860ff0..be8ee34f2 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -1026,8 +1026,7 @@ zvol_add_clones(const char *dsname, list_t *minors_list) out: if (dd != NULL) dsl_dir_rele(dd, FTAG); - if (dp != NULL) - dsl_pool_rele(dp, FTAG); + dsl_pool_rele(dp, FTAG); } /*