[PATCH -next] crypto: simplify code in process_next

From: williamsukatube
Date: Sat Sep 17 2022 - 04:44:53 EST


From: William Dean <williamsukatube@xxxxxxx>

It could directly return 'add_template' to simplify code.

Signed-off-by: William Dean <williamsukatube@xxxxxxx>
---
lib/842/842_compress.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/lib/842/842_compress.c b/lib/842/842_compress.c
index c02baa4168e1..168950bd00af 100644
--- a/lib/842/842_compress.c
+++ b/lib/842/842_compress.c
@@ -441,7 +441,7 @@ static void update_hashtables(struct sw842_param *p)
*/
static int process_next(struct sw842_param *p)
{
- int ret, i;
+ int i;

p->index8[0] = INDEX_NOT_CHECKED;
p->index4[0] = INDEX_NOT_CHECKED;
@@ -457,11 +457,7 @@ static int process_next(struct sw842_param *p)
break;
}

- ret = add_template(p, i);
- if (ret)
- return ret;
-
- return 0;
+ return add_template(p, i);
}

/**
--
2.25.1