diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2022-01-03 21:35:37 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-01-03 22:05:22 -0800 |
commit | 08a6df09063818d55c1f0aa8cf3385d8d217b506 (patch) | |
tree | 1d15664ec8a5a43edc49bf54b9ed30b2b3028724 /drivers/input | |
parent | 652c0441de588dafb68516eccd4a89662830d23b (diff) | |
download | linux-rpi-08a6df09063818d55c1f0aa8cf3385d8d217b506.tar.gz linux-rpi-08a6df09063818d55c1f0aa8cf3385d8d217b506.tar.bz2 linux-rpi-08a6df09063818d55c1f0aa8cf3385d8d217b506.zip |
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>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 8dbf1e69c90a..d75a8b179a8a 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -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; |