crypto: qat - remove unneeded variable
authorTadeusz Struk <tadeusz.struk@intel.com>
Wed, 30 Sep 2015 12:40:00 +0000 (05:40 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 1 Oct 2015 13:56:58 +0000 (21:56 +0800)
Remove unneeded variable val_indx.
Issue found by a static analyzer.

Reported-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/qat_hal.c

index 8e711d1c308402ad35ce87822ed16f572d07fe5b..380e761801a71f5471df7e35feeaba7eedc6d3b8 100644 (file)
@@ -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;