diff options
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, |