Commit 647cc9ec authored by Ferdinand Blomqvist's avatar Ferdinand Blomqvist Committed by Thomas Gleixner

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: default avatarFerdinand Blomqvist <ferdinand.blomqvist@gmail.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190620141039.9874-5-ferdinand.blomqvist@gmail.com
parent a343536f
...@@ -88,8 +88,7 @@ ...@@ -88,8 +88,7 @@
/* if syndrome is zero, data[] is a codeword and there are no /* if syndrome is zero, data[] is a codeword and there are no
* errors to correct. So return data[] unmodified * errors to correct. So return data[] unmodified
*/ */
count = 0; return 0;
goto finish;
} }
decode: decode:
...@@ -202,8 +201,7 @@ ...@@ -202,8 +201,7 @@
* deg(lambda) unequal to number of roots => uncorrectable * deg(lambda) unequal to number of roots => uncorrectable
* error detected * error detected
*/ */
count = -EBADMSG; return -EBADMSG;
goto finish;
} }
/* /*
* Compute err+eras evaluator poly omega(x) = s(x)*lambda(x) (modulo * Compute err+eras evaluator poly omega(x) = s(x)*lambda(x) (modulo
...@@ -261,7 +259,6 @@ ...@@ -261,7 +259,6 @@
} }
} }
finish:
if (eras_pos != NULL) { if (eras_pos != NULL) {
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
eras_pos[i] = loc[i] - pad; eras_pos[i] = loc[i] - pad;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment