Input: byd - don't wipe dynamically allocated memory twice
authorVladimir Zapolskiy <vz@mleia.com>
Tue, 26 Apr 2016 16:50:31 +0000 (09:50 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 29 Apr 2016 20:59:01 +0000 (13:59 -0700)
Since memory for a private data is allocated by kzalloc() there is no
need to fill it with zeroes immediately after the allocation.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/byd.c

index fdc243c..ec73f75 100644 (file)
@@ -474,7 +474,6 @@ int byd_init(struct psmouse *psmouse)
        if (!priv)
                return -ENOMEM;
 
-       memset(priv, 0, sizeof(*priv));
        setup_timer(&priv->timer, byd_clear_touch, (unsigned long) psmouse);
 
        psmouse->private = priv;