]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/mtd/chips/gen_probe.c: refactor call to request_module()
authorKees Cook <keescook@chromium.org>
Wed, 19 Jun 2013 00:05:35 +0000 (10:05 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:12:46 +0000 (17:12 +1000)
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>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
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);
        }