The pointer checksum were used before checking that it
isn't NULL. We move the code that use it after the check.
Reported-by: Coverity (CID: 185835)
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
#endif
struct checksum_algo *checksum = info->checksum;
struct padding_algo *padding = info->padding;
- int hash_len = checksum->checksum_len;
+ int hash_len;
if (!prop || !sig || !hash || !checksum)
return -EIO;
}
uint8_t buf[sig_len];
+ hash_len = checksum->checksum_len;
#if !defined(USE_HOSTCC)
ret = uclass_get_device(UCLASS_MOD_EXP, 0, &mod_exp_dev);