[PATCH v4 01/22] log: Fix missing negation of ENOMEM
Sean Anderson
seanga2 at gmail.com
Wed Oct 28 00:55:20 CET 2020
Errors returned should be negative.
Fixes: 45fac9fc18 ("log: Correct missing free() on error in log_add_filter()")
Signed-off-by: Sean Anderson <seanga2 at gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
(no changes since v1)
common/log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/log.c b/common/log.c
index b7a6ebe298..6aab189a46 100644
--- a/common/log.c
+++ b/common/log.c
@@ -278,7 +278,7 @@ int log_add_filter(const char *drv_name, enum log_category_t cat_list[],
if (file_list) {
filt->file_list = strdup(file_list);
if (!filt->file_list) {
- ret = ENOMEM;
+ ret = -ENOMEM;
goto err;
}
}
--
2.28.0
More information about the U-Boot
mailing list