diff options
Diffstat (limited to 'drivers/serial/ioc3_serial.c')
-rw-r--r-- | drivers/serial/ioc3_serial.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/serial/ioc3_serial.c b/drivers/serial/ioc3_serial.c index 9cc0be932316..168073f12cec 100644 --- a/drivers/serial/ioc3_serial.c +++ b/drivers/serial/ioc3_serial.c | |||
@@ -2019,13 +2019,12 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd) | |||
2019 | 2019 | ||
2020 | DPRINT_CONFIG(("%s (0x%p, 0x%p)\n", __FUNCTION__, is, idd)); | 2020 | DPRINT_CONFIG(("%s (0x%p, 0x%p)\n", __FUNCTION__, is, idd)); |
2021 | 2021 | ||
2022 | card_ptr = kmalloc(sizeof(struct ioc3_card), GFP_KERNEL); | 2022 | card_ptr = kzalloc(sizeof(struct ioc3_card), GFP_KERNEL); |
2023 | if (!card_ptr) { | 2023 | if (!card_ptr) { |
2024 | printk(KERN_WARNING "ioc3_attach_one" | 2024 | printk(KERN_WARNING "ioc3_attach_one" |
2025 | ": unable to get memory for the IOC3\n"); | 2025 | ": unable to get memory for the IOC3\n"); |
2026 | return -ENOMEM; | 2026 | return -ENOMEM; |
2027 | } | 2027 | } |
2028 | memset(card_ptr, 0, sizeof(struct ioc3_card)); | ||
2029 | idd->data[is->id] = card_ptr; | 2028 | idd->data[is->id] = card_ptr; |
2030 | Submodule_slot = is->id; | 2029 | Submodule_slot = is->id; |
2031 | 2030 | ||
@@ -2040,13 +2039,12 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd) | |||
2040 | 2039 | ||
2041 | /* Create port structures for each port */ | 2040 | /* Create port structures for each port */ |
2042 | for (phys_port = 0; phys_port < PORTS_PER_CARD; phys_port++) { | 2041 | for (phys_port = 0; phys_port < PORTS_PER_CARD; phys_port++) { |
2043 | port = kmalloc(sizeof(struct ioc3_port), GFP_KERNEL); | 2042 | port = kzalloc(sizeof(struct ioc3_port), GFP_KERNEL); |
2044 | if (!port) { | 2043 | if (!port) { |
2045 | printk(KERN_WARNING | 2044 | printk(KERN_WARNING |
2046 | "IOC3 serial memory not available for port\n"); | 2045 | "IOC3 serial memory not available for port\n"); |
2047 | goto out4; | 2046 | goto out4; |
2048 | } | 2047 | } |
2049 | memset(port, 0, sizeof(struct ioc3_port)); | ||
2050 | spin_lock_init(&port->ip_lock); | 2048 | spin_lock_init(&port->ip_lock); |
2051 | 2049 | ||
2052 | /* we need to remember the previous ones, to point back to | 2050 | /* we need to remember the previous ones, to point back to |