mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2025-04-19 20:58:31 +09:00
mtd: mtdpart: Do not supply NULL to printf()
GCC compiler is not happy about NULL being supplied as printf() parameter: drivers/mtd/mtdpart.c:693:34: error: ‘%s’ directive argument is null [-Werror=format-overflow=] Move the code after the parser test for NULL, and drop the ternary completely. The user can deduct this since when it's not NULL two messages will be printed. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
parent
2a6a44555f
commit
6bc9f42739
@ -690,10 +690,9 @@ int parse_mtd_partitions(struct mtd_info *master, const char *const *types,
|
||||
parser = mtd_part_parser_get(*types);
|
||||
if (!parser && !request_module("%s", *types))
|
||||
parser = mtd_part_parser_get(*types);
|
||||
pr_debug("%s: got parser %s\n", master->name,
|
||||
parser ? parser->name : NULL);
|
||||
if (!parser)
|
||||
continue;
|
||||
pr_debug("%s: got parser %s\n", master->name, parser->name);
|
||||
ret = mtd_part_do_parse(parser, master, &pparts, data);
|
||||
if (ret <= 0)
|
||||
mtd_part_parser_put(parser);
|
||||
|
Loading…
x
Reference in New Issue
Block a user