summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2007-08-30 00:18:00 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2007-08-30 00:18:00 -0400
commit7460caf32a16866f9d8675aa7aefd7d82d1e23f7 (patch)
tree894d636ecfc531cc8bfd35843d44d5ca8df272df
parentd9f03831e7dc743ae25863c59f38884f5989ab39 (diff)
downloadtalos-obmc-linux-7460caf32a16866f9d8675aa7aefd7d82d1e23f7.tar.gz
talos-obmc-linux-7460caf32a16866f9d8675aa7aefd7d82d1e23f7.zip
Input: gscps2 - convert to use kzalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r--drivers/input/serio/gscps2.c6
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)
if (dev->id.sversion == 0x96)
hpa += GSC_DINO_OFFSET;
- ps2port = kmalloc(sizeof(struct gscps2port), GFP_KERNEL);
- serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+ ps2port = kzalloc(sizeof(struct gscps2port), GFP_KERNEL);
+ serio = kzalloc(sizeof(struct serio), GFP_KERNEL);
if (!ps2port || !serio) {
ret = -ENOMEM;
goto fail_nomem;
@@ -349,8 +349,6 @@ static int __init gscps2_probe(struct parisc_device *dev)
dev_set_drvdata(&dev->dev, ps2port);
- memset(ps2port, 0, sizeof(struct gscps2port));
- memset(serio, 0, sizeof(struct serio));
ps2port->port = serio;
ps2port->padev = dev;
ps2port->addr = ioremap_nocache(hpa, GSC_STATUS + 4);
OpenPOWER on IntegriCloud