diff options
author | Burman Yan <yan_952@hotmail.com> | 2007-02-14 03:33:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-14 11:09:52 -0500 |
commit | 8f31bb39ec2a5622974666c72257e74c22492602 (patch) | |
tree | 48f38c994f02c8699fe2a69599e8cc1bc8d36ea8 /drivers/serial/icom.c | |
parent | 3689a0ec60bc8f56cc372c1dfa0d89dab48f7c9c (diff) |
[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>
Diffstat (limited to 'drivers/serial/icom.c')
-rw-r--r-- | drivers/serial/icom.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c index 71e6a24d8c28..1c4c381bbc5a 100644 --- a/drivers/serial/icom.c +++ b/drivers/serial/icom.c | |||
@@ -1417,14 +1417,12 @@ static int __devinit icom_alloc_adapter(struct icom_adapter | |||
1417 | struct list_head *tmp; | 1417 | struct list_head *tmp; |
1418 | 1418 | ||
1419 | icom_adapter = (struct icom_adapter *) | 1419 | icom_adapter = (struct icom_adapter *) |
1420 | kmalloc(sizeof(struct icom_adapter), GFP_KERNEL); | 1420 | kzalloc(sizeof(struct icom_adapter), GFP_KERNEL); |
1421 | 1421 | ||
1422 | if (!icom_adapter) { | 1422 | if (!icom_adapter) { |
1423 | return -ENOMEM; | 1423 | return -ENOMEM; |
1424 | } | 1424 | } |
1425 | 1425 | ||
1426 | memset(icom_adapter, 0, sizeof(struct icom_adapter)); | ||
1427 | |||
1428 | list_for_each(tmp, &icom_adapter_head) { | 1426 | list_for_each(tmp, &icom_adapter_head) { |
1429 | cur_adapter_entry = | 1427 | cur_adapter_entry = |
1430 | list_entry(tmp, struct icom_adapter, | 1428 | list_entry(tmp, struct icom_adapter, |