Commit 1dd7fdb163645f453f5ae55686511b6fcc2314cd

Authored by Jörn Engel
Committed by David Woodhouse
1 parent c32b8dcc45

[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>

Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff

lib/reed_solomon/decode_rs.c
... ... @@ -39,8 +39,7 @@
39 39  
40 40 /* Check length parameter for validity */
41 41 pad = nn - nroots - len;
42   - if (pad < 0 || pad >= nn)
43   - return -ERANGE;
  42 + BUG_ON(pad < 0 || pad >= nn);
44 43  
45 44 /* Does the caller provide the syndrome ? */
46 45 if (s != NULL)