@@ -156,9 +156,8 @@ static int arc_ps2_create_port(struct platform_device *pdev,
int index)
{
struct arc_ps2_port *port = &arc_ps2->port[index];
- struct serio *io;
+ struct serio *io = kzalloc(sizeof(*io), GFP_KERNEL);
- io = kzalloc(sizeof(struct serio), GFP_KERNEL);
if (!io)
return -ENOMEM;
@@ -195,8 +194,7 @@ static int arc_ps2_probe(struct platform_device *pdev)
return -EINVAL;
}
- arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(struct arc_ps2_data),
- GFP_KERNEL);
+ arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(*arc_ps2), GFP_KERNEL);
if (!arc_ps2)
return -ENOMEM;