aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/ambakmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/serio/ambakmi.c')
-rw-r--r--drivers/input/serio/ambakmi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c
index 5a7b49c35539..b10ffae7c39b 100644
--- a/drivers/input/serio/ambakmi.c
+++ b/drivers/input/serio/ambakmi.c
@@ -117,15 +117,13 @@ static int amba_kmi_probe(struct amba_device *dev, void *id)
117 if (ret) 117 if (ret)
118 return ret; 118 return ret;
119 119
120 kmi = kmalloc(sizeof(struct amba_kmi_port), GFP_KERNEL); 120 kmi = kzalloc(sizeof(struct amba_kmi_port), GFP_KERNEL);
121 io = kmalloc(sizeof(struct serio), GFP_KERNEL); 121 io = kzalloc(sizeof(struct serio), GFP_KERNEL);
122 if (!kmi || !io) { 122 if (!kmi || !io) {
123 ret = -ENOMEM; 123 ret = -ENOMEM;
124 goto out; 124 goto out;
125 } 125 }
126 126
127 memset(kmi, 0, sizeof(struct amba_kmi_port));
128 memset(io, 0, sizeof(struct serio));
129 127
130 io->id.type = SERIO_8042; 128 io->id.type = SERIO_8042;
131 io->write = amba_kmi_write; 129 io->write = amba_kmi_write;