diff options
Diffstat (limited to 'drivers/input/serio/gscps2.c')
-rw-r--r-- | drivers/input/serio/gscps2.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index 74f14e097789..3e99df6be084 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c | |||
@@ -340,8 +340,8 @@ static int __init gscps2_probe(struct parisc_device *dev) | |||
340 | if (dev->id.sversion == 0x96) | 340 | if (dev->id.sversion == 0x96) |
341 | hpa += GSC_DINO_OFFSET; | 341 | hpa += GSC_DINO_OFFSET; |
342 | 342 | ||
343 | ps2port = kmalloc(sizeof(struct gscps2port), GFP_KERNEL); | 343 | ps2port = kzalloc(sizeof(struct gscps2port), GFP_KERNEL); |
344 | serio = kmalloc(sizeof(struct serio), GFP_KERNEL); | 344 | serio = kzalloc(sizeof(struct serio), GFP_KERNEL); |
345 | if (!ps2port || !serio) { | 345 | if (!ps2port || !serio) { |
346 | ret = -ENOMEM; | 346 | ret = -ENOMEM; |
347 | goto fail_nomem; | 347 | goto fail_nomem; |
@@ -349,8 +349,6 @@ static int __init gscps2_probe(struct parisc_device *dev) | |||
349 | 349 | ||
350 | dev_set_drvdata(&dev->dev, ps2port); | 350 | dev_set_drvdata(&dev->dev, ps2port); |
351 | 351 | ||
352 | memset(ps2port, 0, sizeof(struct gscps2port)); | ||
353 | memset(serio, 0, sizeof(struct serio)); | ||
354 | ps2port->port = serio; | 352 | ps2port->port = serio; |
355 | ps2port->padev = dev; | 353 | ps2port->padev = dev; |
356 | ps2port->addr = ioremap_nocache(hpa, GSC_STATUS + 4); | 354 | ps2port->addr = ioremap_nocache(hpa, GSC_STATUS + 4); |