“959f4f13a3fe661ee2761c4dc9a70196fb8b1c12”上不存在“arch/parisc/include/asm/processor.h”
提交 93867233 编写于 作者: B Brian Norris

mtd: zero out mtd_partition struct before using it

It's easier to guarantee we've cleared out all unused fields with
memset() than by manually initializing each field.
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
上级 215a02fd
......@@ -596,11 +596,10 @@ int mtd_add_partition(struct mtd_info *master, const char *name,
if (length <= 0)
return -EINVAL;
memset(&part, 0, sizeof(part));
part.name = name;
part.size = length;
part.offset = offset;
part.mask_flags = 0;
part.ecclayout = NULL;
new = allocate_partition(master, &part, -1, offset);
if (IS_ERR(new))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册