From: Kees Cook Date: Wed, 19 Jun 2013 00:05:35 +0000 (+1000) Subject: drivers/mtd/chips/gen_probe.c: refactor call to request_module() X-Git-Tag: next-20130619~2^2~611 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1e9be1912ee00927c6eb97fbf363c02b879ce5db;p=karo-tx-linux.git drivers/mtd/chips/gen_probe.c: 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: Kees Cook Cc: David Woodhouse Cc: James Hogan Cc: Rusty Russell Signed-off-by: Andrew Morton --- diff --git a/drivers/mtd/chips/gen_probe.c b/drivers/mtd/chips/gen_probe.c index 74dbb6bcf488..ffb36ba8a6e0 100644 --- a/drivers/mtd/chips/gen_probe.c +++ b/drivers/mtd/chips/gen_probe.c @@ -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); }