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 behlendorf committed Oct 18, 2022
1 parent ef55679 commit 717641a
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 @@ -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);
}

/*
Expand Down

0 comments on commit 717641a

Please sign in to comment.