rslib: decode_rs: Code cleanup
Nothing useful was done after the finish label when count is negative so return directly instead of jumping to finish. Signed-off-by: Ferdinand Blomqvist <ferdinand.blomqvist@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20190620141039.9874-5-ferdinand.blomqvist@gmail.com
This commit is contained in:
parent
a343536f8f
commit
647cc9ece6
|
@ -88,8 +88,7 @@
|
|||
/* if syndrome is zero, data[] is a codeword and there are no
|
||||
* errors to correct. So return data[] unmodified
|
||||
*/
|
||||
count = 0;
|
||||
goto finish;
|
||||
return 0;
|
||||
}
|
||||
|
||||
decode:
|
||||
|
@ -202,8 +201,7 @@
|
|||
* deg(lambda) unequal to number of roots => uncorrectable
|
||||
* error detected
|
||||
*/
|
||||
count = -EBADMSG;
|
||||
goto finish;
|
||||
return -EBADMSG;
|
||||
}
|
||||
/*
|
||||
* Compute err+eras evaluator poly omega(x) = s(x)*lambda(x) (modulo
|
||||
|
@ -261,7 +259,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
finish:
|
||||
if (eras_pos != NULL) {
|
||||
for (i = 0; i < count; i++)
|
||||
eras_pos[i] = loc[i] - pad;
|
||||
|
|
Loading…
Reference in New Issue