summaryrefslogtreecommitdiffstats
path: root/module/zfs/sa.c
diff options
context:
space:
mode:
authorTobin Harding <[email protected]>2017-10-11 10:41:47 +1100
committerBrian Behlendorf <[email protected]>2017-10-10 16:41:47 -0700
commit523d5ce0f48a1b7127345d830e5a34079cace322 (patch)
tree682fdc258b0053c8ae445455649cbfa5c9f113fe /module/zfs/sa.c
parent829e95c4dc74d7d6d31d01af9c39e03752499b15 (diff)
Fix coverity defects: CID 147474
CID 147474: Logically dead code (DEADCODE) Remove ternary operator and return `error` directly. Currently return value is derived from a ternary operator. The conditional is always true. The ternary operator is therefore redundant i.e dead code. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tobin C. Harding <[email protected]> Closes #6723
Diffstat (limited to 'module/zfs/sa.c')
-rw-r--r--module/zfs/sa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/sa.c b/module/zfs/sa.c
index 8046dbde2..f0a18bad8 100644
--- a/module/zfs/sa.c
+++ b/module/zfs/sa.c
@@ -980,7 +980,8 @@ bail:
kmem_free(sa->sa_user_table, count * sizeof (sa_attr_type_t));
sa->sa_user_table = NULL;
sa_free_attr_table(sa);
- return ((error != 0) ? error : EINVAL);
+ ASSERT(error != 0);
+ return (error);
}
int