summaryrefslogtreecommitdiff
path: root/lib/reed_solomon/decode_rs.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/reed_solomon/decode_rs.c')
-rw-r--r--lib/reed_solomon/decode_rs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/reed_solomon/decode_rs.c b/lib/reed_solomon/decode_rs.c
index a58df56..0ec3f25 100644
--- a/lib/reed_solomon/decode_rs.c
+++ b/lib/reed_solomon/decode_rs.c
@@ -39,8 +39,7 @@
/* Check length parameter for validity */
pad = nn - nroots - len;
- if (pad < 0 || pad >= nn)
- return -ERANGE;
+ BUG_ON(pad < 0 || pad >= nn);
/* Does the caller provide the syndrome ? */
if (s != NULL)
@@ -203,7 +202,7 @@
* deg(lambda) unequal to number of roots => uncorrectable
* error detected
*/
- count = -1;
+ count = -EBADMSG;
goto finish;
}
/*