Sfoglia il codice sorgente

[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>
Jörn Engel 17 anni fa
parent
commit
1dd7fdb163
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. 1 2
      lib/reed_solomon/decode_rs.c

+ 1 - 2
lib/reed_solomon/decode_rs.c

@@ -39,8 +39,7 @@
 
 
 	/* Check length parameter for validity */
 	/* Check length parameter for validity */
 	pad = nn - nroots - len;
 	pad = nn - nroots - len;
-	if (pad < 0 || pad >= nn)
-		return -ERANGE;
+	BUG_ON(pad < 0 || pad >= nn);
 
 
 	/* Does the caller provide the syndrome ? */
 	/* Does the caller provide the syndrome ? */
 	if (s != NULL)
 	if (s != NULL)