]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - common/cli_readline.c
cli: panic when failed to allocate memory for the history buffer
[thirdparty/u-boot.git] / common / cli_readline.c
index 2507be2295269a64b9eefe50ba4572c5e4111337..99e7efdfe55553b78f181949433ef97aeb179ce9 100644 (file)
@@ -110,7 +110,7 @@ static int hist_init(void)
 
        hist = calloc(HIST_MAX, HIST_SIZE + 1);
        if (!hist)
-               return -ENOMEM;
+               panic("%s: calloc: out of memory!\n", __func__);
 
        for (i = 0; i < HIST_MAX; i++)
                hist_list[i] = hist + (i * (HIST_SIZE + 1));