[PATCH] serial: replace kmalloc+memset with kzalloc
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Цей коміт міститься в:

зафіксовано
Linus Torvalds

джерело
3689a0ec60
коміт
8f31bb39ec
@@ -1417,14 +1417,12 @@ static int __devinit icom_alloc_adapter(struct icom_adapter
|
||||
struct list_head *tmp;
|
||||
|
||||
icom_adapter = (struct icom_adapter *)
|
||||
kmalloc(sizeof(struct icom_adapter), GFP_KERNEL);
|
||||
kzalloc(sizeof(struct icom_adapter), GFP_KERNEL);
|
||||
|
||||
if (!icom_adapter) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memset(icom_adapter, 0, sizeof(struct icom_adapter));
|
||||
|
||||
list_for_each(tmp, &icom_adapter_head) {
|
||||
cur_adapter_entry =
|
||||
list_entry(tmp, struct icom_adapter,
|
||||
|
Посилання в новій задачі
Заблокувати користувача