提交 08a6df09 编写于 作者: C Christophe JAILLET 提交者: Dmitry Torokhov

Input: gpio-keys - avoid clearing twice some memory

bitmap_parselist() already clears the 'bits' bitmap, so there is no need
to clear it when it is allocated. This just wastes some cycles.
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: NPaul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/d6ee621b9dd75b92f8831db365cee58dc2025322.1640813136.git.christophe.jaillet@wanadoo.frSigned-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 652c0441
......@@ -247,7 +247,7 @@ static ssize_t gpio_keys_attr_store_helper(struct gpio_keys_drvdata *ddata,
ssize_t error;
int i;
bits = bitmap_zalloc(n_events, GFP_KERNEL);
bits = bitmap_alloc(n_events, GFP_KERNEL);
if (!bits)
return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册