]> err.no Git - linux-2.6/commitdiff
[RSLIB] BUG() when passing illegal parameters to decode_rs8() or decode_rs16()
authorJörn Engel <joern@logfs.org>
Sat, 20 Oct 2007 21:14:42 +0000 (23:14 +0200)
committerDavid Woodhouse <dwmw2@infradead.org>
Sat, 20 Oct 2007 21:29:09 +0000 (22:29 +0100)
Returning -ERANGE should never happen.

Signed-off-by: Jörn Engel <joern@logfs.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
lib/reed_solomon/decode_rs.c

index a58df56f09b6093f06a038f9a38675936ec3fa88..65bc718f0dc08a3490c20ee147f5a3f719d30dbe 100644 (file)
@@ -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)