diff options
-rw-r--r-- | cmd/upl.c | 2 | ||||
-rw-r--r-- | include/linux/mtd/spi-nor.h | 6 | ||||
-rw-r--r-- | lib/lmb.c | 2 | ||||
-rw-r--r-- | lib/mbedtls/pkcs7_parser.c | 7 | ||||
-rw-r--r-- | lib/mbedtls/x509_cert_parser.c | 2 |
5 files changed, 9 insertions, 10 deletions
diff --git a/cmd/upl.c b/cmd/upl.c index c9745886507..4996f36c787 100644 --- a/cmd/upl.c +++ b/cmd/upl.c @@ -72,7 +72,7 @@ static int do_upl_write(struct cmd_tbl *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } addr = map_to_sysmem(abuf_data(&buf)); - printf("UPL handoff written to %lx size %lx\n", addr, abuf_size(&buf)); + printf("UPL handoff written to %lx size %zx\n", addr, abuf_size(&buf)); if (env_set_hex("upladdr", addr) || env_set_hex("uplsize", abuf_size(&buf))) { printf("Cannot set env var\n"); diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index 1ae586b2e5f..655a6d197ea 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -182,15 +182,15 @@ /* Status Register 2 bits. */ #define SR2_QUAD_EN_BIT7 BIT(7) +/* Status Register 3 bits. */ +#define SR3_WPS BIT(2) + /* * Maximum number of flashes that can be connected * in stacked/parallel configuration */ #define SNOR_FLASH_CNT_MAX 2 -/* Status Register 3 bits. */ -#define SR3_WPS BIT(2) - /* For Cypress flash. */ #define SPINOR_OP_RD_ANY_REG 0x65 /* Read any register */ #define SPINOR_OP_WR_ANY_REG 0x71 /* Write any register */ diff --git a/lib/lmb.c b/lib/lmb.c index 78fe2d4de7c..7e90f178763 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -487,7 +487,7 @@ long lmb_add(phys_addr_t base, phys_size_t size) struct alist *lmb_rgn_lst = &lmb.free_mem; ret = lmb_add_region(lmb_rgn_lst, base, size); - if (ret) + if (ret < 0) return ret; if (lmb_should_notify(LMB_NONE)) diff --git a/lib/mbedtls/pkcs7_parser.c b/lib/mbedtls/pkcs7_parser.c index 69ca784858e..ecfcc46edfa 100644 --- a/lib/mbedtls/pkcs7_parser.c +++ b/lib/mbedtls/pkcs7_parser.c @@ -206,9 +206,6 @@ static int authattrs_parse(struct pkcs7_message *msg, void *aa, size_t aa_len, p += seq_len; } - if (ret && ret != MBEDTLS_ERR_ASN1_OUT_OF_DATA) - return ret; - msg->have_authattrs = true; /* @@ -361,8 +358,10 @@ static int x509_populate_sinfo(struct pkcs7_message *msg, signed_info->sig = s; /* Save the Authenticate Attributes data if exists */ - if (!mb_sinfo->authattrs.data || !mb_sinfo->authattrs.data_len) + if (!mb_sinfo->authattrs.data || !mb_sinfo->authattrs.data_len) { + kfree(mctx); goto no_authattrs; + } mctx->authattrs_data = kmemdup(mb_sinfo->authattrs.data, mb_sinfo->authattrs.data_len, diff --git a/lib/mbedtls/x509_cert_parser.c b/lib/mbedtls/x509_cert_parser.c index cb42018695c..e163e16b9bc 100644 --- a/lib/mbedtls/x509_cert_parser.c +++ b/lib/mbedtls/x509_cert_parser.c @@ -66,7 +66,7 @@ time64_t x509_get_timestamp(const mbedtls_x509_time *x509_time) static char *x509_populate_dn_name_string(const mbedtls_x509_name *name) { size_t len = 256; - size_t wb; + int wb; char *name_str; do { |