提交 f9827dde 编写于 作者: K Kees Cook 提交者: David Woodhouse

mtd: refactor call to request_module

This reduces the size of the stack frame when calling request_module().
Performing the sprintf before the call is not needed.
Signed-off-by: NKees Cook <keescook@chromium.org>
Acked-by: NRusty Russell <rusty@rustcorp.com.au>
Reviewed-by: NJames Hogan <james.hogan@imgtec.com>
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 2e294972
...@@ -211,9 +211,7 @@ static inline struct mtd_info *cfi_cmdset_unknown(struct map_info *map, ...@@ -211,9 +211,7 @@ static inline struct mtd_info *cfi_cmdset_unknown(struct map_info *map,
probe_function = __symbol_get(probename); probe_function = __symbol_get(probename);
if (!probe_function) { if (!probe_function) {
char modname[sizeof("cfi_cmdset_%4.4X")]; request_module("cfi_cmdset_%4.4X", type);
sprintf(modname, "cfi_cmdset_%4.4X", type);
request_module(modname);
probe_function = __symbol_get(probename); probe_function = __symbol_get(probename);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册