Skip to content

Commit

Permalink
Cleanup: zvol_add_clones() should not NULL check dp
Browse files Browse the repository at this point in the history
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 openzfs#14042
  • Loading branch information
ryao authored and andrewc12 committed Nov 9, 2022
1 parent 4977408 commit 5ba1c23
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions module/zfs/zvol.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit 5ba1c23

Please sign in to comment.