From 1dd7fdb163645f453f5ae55686511b6fcc2314cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Engel?= Date: Sat, 20 Oct 2007 23:14:42 +0200 Subject: [PATCH] [RSLIB] BUG() when passing illegal parameters to decode_rs8() or decode_rs16() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Returning -ERANGE should never happen. Signed-off-by: Jörn Engel Signed-off-by: David Woodhouse --- lib/reed_solomon/decode_rs.c | 3 +-- 1 file changed, 1 insertion(+), 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 @@ /* 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)