Skip to content

Commit 08a6df0

Browse files
tititiou36dtor
authored andcommitted
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/d6ee621b9dd75b92f8831db365cee58dc2025322.1640813136.git.christophe.jaillet@wanadoo.fr Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 652c044 commit 08a6df0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/input/keyboard/gpio_keys.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ static ssize_t gpio_keys_attr_store_helper(struct gpio_keys_drvdata *ddata,
247247
ssize_t error;
248248
int i;
249249

250-
bits = bitmap_zalloc(n_events, GFP_KERNEL);
250+
bits = bitmap_alloc(n_events, GFP_KERNEL);
251251
if (!bits)
252252
return -ENOMEM;
253253

0 commit comments

Comments
 (0)