diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2022-01-20 03:10:38 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-20 07:52:55 +0100 |
commit | b1e78ef3be2533973953a35a56739fda7325875c (patch) | |
tree | 13d2a89405c76fb3f0eb3d363a8f9f84e2193a7f /lib/asn1_encoder.c | |
parent | ubsan: remove CONFIG_UBSAN_OBJECT_SIZE (diff) | |
download | linux-b1e78ef3be2533973953a35a56739fda7325875c.tar.xz linux-b1e78ef3be2533973953a35a56739fda7325875c.zip |
lib: remove redundant assignment to variable ret
The variable ret is being assigned a value that is never read. If the
for-loop is entered then ret is immediately re-assigned a new value. If
the for-loop is not executed ret is never read. The assignment is
redundant and can be removed.
Link: https://lkml.kernel.org/r/20211230134557.83633-1-colin.i.king@gmail.com
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r-- | lib/asn1_encoder.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/asn1_encoder.c b/lib/asn1_encoder.c index 27bbe891714f..0fd3c454a468 100644 --- a/lib/asn1_encoder.c +++ b/lib/asn1_encoder.c @@ -164,8 +164,6 @@ asn1_encode_oid(unsigned char *data, const unsigned char *end_data, data_len -= 3; - ret = 0; - for (i = 2; i < oid_len; i++) { ret = asn1_encode_oid_digit(&d, &data_len, oid[i]); if (ret < 0) |