aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJörn Engel <joern@logfs.org>2007-10-20 17:14:42 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2007-10-20 17:29:09 -0400
commit1dd7fdb163645f453f5ae55686511b6fcc2314cd (patch)
treebf07861981b8dac7a01286e9ef21d96618254ee6 /lib
parentc32b8dcc45c823cf30dcdf0fc37ee2f6b78f38cb (diff)
[RSLIB] BUG() when passing illegal parameters to decode_rs8() or decode_rs16()
Returning -ERANGE should never happen. Signed-off-by: Jörn Engel <joern@logfs.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/reed_solomon/decode_rs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/reed_solomon/decode_rs.c b/lib/reed_solomon/decode_rs.c
index a58df56f09b6..65bc718f0dc0 100644
--- a/lib/reed_solomon/decode_rs.c
+++ b/lib/reed_solomon/decode_rs.c
@@ -39,8 +39,7 @@
39 39
40 /* Check length parameter for validity */ 40 /* Check length parameter for validity */
41 pad = nn - nroots - len; 41 pad = nn - nroots - len;
42 if (pad < 0 || pad >= nn) 42 BUG_ON(pad < 0 || pad >= nn);
43 return -ERANGE;
44 43
45 /* Does the caller provide the syndrome ? */ 44 /* Does the caller provide the syndrome ? */
46 if (s != NULL) 45 if (s != NULL)