mtd: refactor call to request_module
authorKees Cook <keescook@chromium.org>
Mon, 8 Jul 2013 13:05:12 +0000 (06:05 -0700)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 5 Aug 2013 20:01:42 +0000 (21:01 +0100)
This reduces the size of the stack frame when calling request_module().
Performing the sprintf before the call is not needed.

Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/chips/gen_probe.c

index 74dbb6bcf4883a8a0461685ea0f180de7ad3da0d..ffb36ba8a6e050e0d8da73a7661cd7734905707d 100644 (file)
@@ -211,9 +211,7 @@ static inline struct mtd_info *cfi_cmdset_unknown(struct map_info *map,
 
        probe_function = __symbol_get(probename);
        if (!probe_function) {
-               char modname[sizeof("cfi_cmdset_%4.4X")];
-               sprintf(modname, "cfi_cmdset_%4.4X", type);
-               request_module(modname);
+               request_module("cfi_cmdset_%4.4X", type);
                probe_function = __symbol_get(probename);
        }