diff options
Diffstat (limited to 'common/binfmt.c')
-rw-r--r-- | common/binfmt.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/common/binfmt.c b/common/binfmt.c index f2ff624587..6a1e9fc83e 100644 --- a/common/binfmt.c +++ b/common/binfmt.c @@ -1,7 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> - * - * GPL v2 */ #include <common.h> @@ -16,9 +15,13 @@ static LIST_HEAD(binfmt_hooks); static int binfmt_run(char *file, int argc, char **argv) { struct binfmt_hook *b; - enum filetype type = file_name_detect_type(file); + enum filetype type; int ret; + ret = file_name_detect_type(file, &type); + if (ret) + return ret; + list_for_each_entry(b, &binfmt_hooks, list) { if (b->type != type) continue; |