staging: unisys: Don't zero struct elements which will be memset away
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
bbd4be301c
Коммит
cbc2af3cb5
|
@ -522,12 +522,7 @@ bus_info_clear(void *v)
|
||||||
struct visorchipset_bus_info *p = (struct visorchipset_bus_info *) v;
|
struct visorchipset_bus_info *p = (struct visorchipset_bus_info *) v;
|
||||||
|
|
||||||
kfree(p->name);
|
kfree(p->name);
|
||||||
p->name = NULL;
|
|
||||||
|
|
||||||
kfree(p->description);
|
kfree(p->description);
|
||||||
p->description = NULL;
|
|
||||||
|
|
||||||
p->state.created = 0;
|
|
||||||
memset(p, 0, sizeof(struct visorchipset_bus_info));
|
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 *p =
|
||||||
(struct visorchipset_device_info *) v;
|
(struct visorchipset_device_info *) v;
|
||||||
|
|
||||||
p->state.created = 0;
|
|
||||||
memset(p, 0, sizeof(struct visorchipset_device_info));
|
memset(p, 0, sizeof(struct visorchipset_device_info));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче