board: atmel: sama5d2_icp: standby disable on CAN transceivers in SPL
[oweals/u-boot.git] / cmd / ximg.c
index 069c6ad39abed4bff19b804a03667ff7d14fe69b..32bfae8b22be6c1c5ee1c1d7d837c10c091280d8 100644 (file)
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2000-2004
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
  * (C) Copyright 2003
  * Kai-Uwe Bloem, Auerswald GmbH & Co KG, <linux-development@auerswald.de>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 
@@ -144,7 +143,7 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
                        return 1;
                }
 
-               if (fit_image_check_comp(fit_hdr, noffset, IH_COMP_NONE)
+               if (!fit_image_check_comp(fit_hdr, noffset, IH_COMP_NONE)
                    && (argc < 4)) {
                        printf("Must specify load address for %s command "
                                "with compressed image\n",
@@ -160,9 +159,9 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
                        }
                }
 
-               /* get subimage data address and length */
-               if (fit_image_get_data(fit_hdr, noffset,
-                                       &fit_data, &fit_len)) {
+               /* get subimage/external data address and length */
+               if (fit_image_get_data_and_size(fit_hdr, noffset,
+                                              &fit_data, &fit_len)) {
                        puts("Could not find script subimage data\n");
                        return 1;
                }