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 <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14042
This commit is contained in:
Richard Yao 2022-10-17 02:18:09 -04:00 committed by Brian Behlendorf
parent ef55679a75
commit 717641ac09

View File

@ -1026,7 +1026,6 @@ zvol_add_clones(const char *dsname, list_t *minors_list)
out: out:
if (dd != NULL) if (dd != NULL)
dsl_dir_rele(dd, FTAG); dsl_dir_rele(dd, FTAG);
if (dp != NULL)
dsl_pool_rele(dp, FTAG); dsl_pool_rele(dp, FTAG);
} }