[PATCH] BUG() when passing illegal parameters to decode_rs8() or decode_rs16()
Jörn Engel
joern at logfs.org
Sat Oct 20 07:11:26 EDT 2007
Returning -ERANGE should never happen.
--- linux-2.6.22cow/lib/reed_solomon/decode_rs.c~rs_ERANGE 2006-10-13 15:58:51.000000000 +0200
+++ linux-2.6.22cow/lib/reed_solomon/decode_rs.c 2007-10-20 13:07:57.000000000 +0200
@@ -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)
More information about the linux-mtd
mailing list