提交 cbc2af3c 编写于 作者: J Jes Sorensen 提交者: Greg Kroah-Hartman

staging: unisys: Don't zero struct elements which will be memset away

Signed-off-by: NJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 bbd4be30
......@@ -522,12 +522,7 @@ bus_info_clear(void *v)
struct visorchipset_bus_info *p = (struct visorchipset_bus_info *) v;
kfree(p->name);
p->name = NULL;
kfree(p->description);
p->description = NULL;
p->state.created = 0;
memset(p, 0, sizeof(struct visorchipset_bus_info));
}
......@@ -537,7 +532,6 @@ dev_info_clear(void *v)
struct visorchipset_device_info *p =
(struct visorchipset_device_info *) v;
p->state.created = 0;
memset(p, 0, sizeof(struct visorchipset_device_info));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册