diff options
-rw-r--r-- | plat/imx/common/imx_sip_handler.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plat/imx/common/imx_sip_handler.c b/plat/imx/common/imx_sip_handler.c index a8f92b97b..af3389181 100644 --- a/plat/imx/common/imx_sip_handler.c +++ b/plat/imx/common/imx_sip_handler.c @@ -214,12 +214,18 @@ static uint64_t imx_get_commit_hash(u_register_t x2, if (*(parse) == 'g') { /* Default is 7 hexadecimal digits */ memcpy((void *)&hash, (void *)(parse + 1), 7); - break; + return hash; } } } while (parse != NULL); + /* When no tag, the build string only contains commit and dirty */ + parse = strchr(version_string, ':'); + if (parse && *(parse + 1) != '\0') { + memcpy((void *)&hash, (void *)(parse + 1), 7); + } + return hash; } |