From 316afa4f3cfa97d356351adb5d2b364b4c81ac70 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 2e11386b3b57..b3af6baedd02 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -1027,8 +1027,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); } /*