aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/8250_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/8250_pci.c')
-rw-r--r--drivers/serial/8250_pci.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index a2dac378bda9..6d7d616e9ccd 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -16,7 +16,6 @@
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/sched.h>
20#include <linux/string.h> 19#include <linux/string.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/slab.h> 21#include <linux/slab.h>
@@ -1628,7 +1627,7 @@ pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board)
1628 nr_ports = rc; 1627 nr_ports = rc;
1629 } 1628 }
1630 1629
1631 priv = kmalloc(sizeof(struct serial_private) + 1630 priv = kzalloc(sizeof(struct serial_private) +
1632 sizeof(unsigned int) * nr_ports, 1631 sizeof(unsigned int) * nr_ports,
1633 GFP_KERNEL); 1632 GFP_KERNEL);
1634 if (!priv) { 1633 if (!priv) {
@@ -1636,9 +1635,6 @@ pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board)
1636 goto err_deinit; 1635 goto err_deinit;
1637 } 1636 }
1638 1637
1639 memset(priv, 0, sizeof(struct serial_private) +
1640 sizeof(unsigned int) * nr_ports);
1641
1642 priv->dev = dev; 1638 priv->dev = dev;
1643 priv->quirk = quirk; 1639 priv->quirk = quirk;
1644 1640