Skip to content

Commit c402075

Browse files
Ryan Moellerjsai20
authored andcommitted
Wrap bare EINVAL returns with SET_ERROR
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes openzfs#11636
1 parent 9f70106 commit c402075

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

module/zfs/zfs_ioctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3986,7 +3986,7 @@ zfs_ioc_pool_initialize(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl)
39863986
fnvlist_free(vdev_errlist);
39873987

39883988
spa_close(spa, FTAG);
3989-
return (total_errors > 0 ? EINVAL : 0);
3989+
return (total_errors > 0 ? SET_ERROR(EINVAL) : 0);
39903990
}
39913991

39923992
/*
@@ -4071,7 +4071,7 @@ zfs_ioc_pool_trim(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl)
40714071
fnvlist_free(vdev_errlist);
40724072

40734073
spa_close(spa, FTAG);
4074-
return (total_errors > 0 ? EINVAL : 0);
4074+
return (total_errors > 0 ? SET_ERROR(EINVAL) : 0);
40754075
}
40764076

40774077
/*

0 commit comments

Comments
 (0)