From: Christophe JAILLET Date: Tue, 4 Jan 2022 05:35:37 +0000 (-0800) Subject: Input: gpio-keys - avoid clearing twice some memory X-Git-Tag: v6.6.17~3754^2~84^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08a6df09063818d55c1f0aa8cf3385d8d217b506;p=platform%2Fkernel%2Flinux-rpi.git 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 Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/d6ee621b9dd75b92f8831db365cee58dc2025322.1640813136.git.christophe.jaillet@wanadoo.fr Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 8dbf1e6..d75a8b1 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;