diff options
Diffstat (limited to 'drivers/input/serio/pcips2.c')
-rw-r--r-- | drivers/input/serio/pcips2.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/serio/pcips2.c b/drivers/input/serio/pcips2.c index ea5e3c6ddb62..1b404f9e3bff 100644 --- a/drivers/input/serio/pcips2.c +++ b/drivers/input/serio/pcips2.c | |||
@@ -140,15 +140,13 @@ static int __devinit pcips2_probe(struct pci_dev *dev, const struct pci_device_i | |||
140 | if (ret) | 140 | if (ret) |
141 | goto disable; | 141 | goto disable; |
142 | 142 | ||
143 | ps2if = kmalloc(sizeof(struct pcips2_data), GFP_KERNEL); | 143 | ps2if = kzalloc(sizeof(struct pcips2_data), GFP_KERNEL); |
144 | serio = kmalloc(sizeof(struct serio), GFP_KERNEL); | 144 | serio = kzalloc(sizeof(struct serio), GFP_KERNEL); |
145 | if (!ps2if || !serio) { | 145 | if (!ps2if || !serio) { |
146 | ret = -ENOMEM; | 146 | ret = -ENOMEM; |
147 | goto release; | 147 | goto release; |
148 | } | 148 | } |
149 | 149 | ||
150 | memset(ps2if, 0, sizeof(struct pcips2_data)); | ||
151 | memset(serio, 0, sizeof(struct serio)); | ||
152 | 150 | ||
153 | serio->id.type = SERIO_8042; | 151 | serio->id.type = SERIO_8042; |
154 | serio->write = pcips2_write; | 152 | serio->write = pcips2_write; |