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.

Signed-off-by: Richard Yao <[email protected]>
  • Loading branch information
ryao committed Oct 17, 2022
1 parent a02f1aa commit dba4be4
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 dba4be4

Please sign in to comment.