From: Tadeusz Struk Date: Wed, 30 Sep 2015 12:40:00 +0000 (-0700) Subject: crypto: qat - remove unneeded variable X-Git-Tag: firefly_0821_release~176^2~676^2~76 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=9196d9676fe790975fdb1fc03230629139c6ea8e;p=firefly-linux-kernel-4.4.55.git crypto: qat - remove unneeded variable Remove unneeded variable val_indx. Issue found by a static analyzer. Reported-by: Giovanni Cabiddu Signed-off-by: Tadeusz Struk Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/qat/qat_common/qat_hal.c b/drivers/crypto/qat/qat_common/qat_hal.c index 8e711d1c3084..380e761801a7 100644 --- a/drivers/crypto/qat/qat_common/qat_hal.c +++ b/drivers/crypto/qat/qat_common/qat_hal.c @@ -1034,7 +1034,7 @@ static int qat_hal_concat_micro_code(uint64_t *micro_inst, unsigned int inst_num, unsigned int size, unsigned int addr, unsigned int *value) { - int i, val_indx; + int i; unsigned int cur_value; const uint64_t *inst_arr; int fixup_offset; @@ -1042,8 +1042,7 @@ static int qat_hal_concat_micro_code(uint64_t *micro_inst, int orig_num; orig_num = inst_num; - val_indx = 0; - cur_value = value[val_indx++]; + cur_value = value[0]; inst_arr = inst_4b; usize = ARRAY_SIZE(inst_4b); fixup_offset = inst_num;