aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/fm.c
diff options
context:
space:
mode:
authorNed Bass <[email protected]>2017-08-02 21:16:12 -0700
committerBrian Behlendorf <[email protected]>2017-08-02 21:16:12 -0700
commitecb2b7dc7f8f7273c215fb30c984bde08e75b852 (patch)
tree55e26ef1e29163fba495ba517d8133d475169651 /module/zfs/fm.c
parent6710381680b0f551c37627e3a5a4886ccf99983f (diff)
Use SET_ERROR for constant non-zero return codes
Update many return and assignment statements to follow the convention of using the SET_ERROR macro when returning a hard-coded non-zero value from a function. This aids debugging by recording the error codes in the debug log. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Signed-off-by: Ned Bass <[email protected]> Closes #6441
Diffstat (limited to 'module/zfs/fm.c')
-rw-r--r--module/zfs/fm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/fm.c b/module/zfs/fm.c
index f6ae16284..00ac20df6 100644
--- a/module/zfs/fm.c
+++ b/module/zfs/fm.c
@@ -578,7 +578,7 @@ zfs_zevent_minor_to_state(minor_t minor, zfs_zevent_t **ze)
{
*ze = zfsdev_get_state(minor, ZST_ZEVENT);
if (*ze == NULL)
- return (EBADF);
+ return (SET_ERROR(EBADF));
return (0);
}
@@ -591,7 +591,7 @@ zfs_zevent_fd_hold(int fd, minor_t *minorp, zfs_zevent_t **ze)
fp = getf(fd);
if (fp == NULL)
- return (EBADF);
+ return (SET_ERROR(EBADF));
error = zfsdev_getminor(fp->f_file, minorp);
if (error == 0)