Skip to content

Commit

Permalink
Input: byd - don't wipe dynamically allocated memory twice
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vladimir Zapolskiy authored and Dmitry Torokhov committed Apr 29, 2016
1 parent 82ba0d8 commit 5ad629a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/input/mouse/byd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5ad629a

Please sign in to comment.