]> Git Repo - J-u-boot.git/blobdiff - lib/hash-checksum.c
Merge patch series "cmd: Add support for optee commands."
[J-u-boot.git] / lib / hash-checksum.c
index d732ecc38fd7561271b5d0bce2e43b58e837afc3..1970a741294d6fd4a97e3d7e3e7464d96966eb94 100644 (file)
@@ -4,7 +4,6 @@
  */
 
 #ifndef USE_HOSTCC
-#include <common.h>
 #include <fdtdec.h>
 #include <asm/byteorder.h>
 #include <linux/errno.h>
 #include <image.h>
 
 int hash_calculate(const char *name,
-                   const struct image_region region[],
+                   const struct image_region *region,
                    int region_count, uint8_t *checksum)
 {
        struct hash_algo *algo;
        int ret = 0;
        void *ctx;
-       uint32_t i;
-       i = 0;
+       int i;
+
+       if (region_count < 1)
+               return -EINVAL;
 
        ret = hash_progressive_lookup_algo(name, &algo);
        if (ret)
This page took 0.021344 seconds and 4 git commands to generate.