X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Freed_solomon%2Fdecode_rs.c;h=0ec3f257ffdf9d38b96dad16276e7b3164f13e63;hb=4d36a9e65d4966b433b2f3424d9457468bc80e00;hp=a58df56f09b6093f06a038f9a38675936ec3fa88;hpb=78b9c0f91cf908616b8f9f356e1d1220e727ea88;p=linux-2.6-omap-h63xx.git diff --git a/lib/reed_solomon/decode_rs.c b/lib/reed_solomon/decode_rs.c index a58df56f09b..0ec3f257ffd 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) @@ -203,7 +202,7 @@ * deg(lambda) unequal to number of roots => uncorrectable * error detected */ - count = -1; + count = -EBADMSG; goto finish; } /*