From dd452b45d9e8470d08159e7198a229bc0e3afed9 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 25 Apr 2014 08:55:28 +1000 Subject: [PATCH] input-route-kbd-leds-through-the-generic-leds-layer-fix Signed-off-by: Andrew Morton --- drivers/input/leds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/leds.c b/drivers/input/leds.c index 1d8a980719ab..985fa7ebeec7 100644 --- a/drivers/input/leds.c +++ b/drivers/input/leds.c @@ -1,7 +1,7 @@ /* * LED support for the input layer * - * Copyright 2010-2013 Samuel Thibault + * Copyright 2010-2014 Samuel Thibault * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -159,7 +159,7 @@ int input_led_connect(struct input_dev *dev) int i, error = 0; struct led_classdev *leds; - dev->leds = leds = kzalloc(sizeof(*leds) * LED_CNT, GFP_KERNEL); + dev->leds = leds = kcalloc(LED_CNT, sizeof(*leds), GFP_KERNEL); if (!dev->leds) return -ENOMEM; @@ -212,8 +212,8 @@ err: } /* - * Disconnected input device. Clean it, and deregister now-useless VT LEDs and - * triggers. + * Disconnected input device. Clean it, and deregister now-useless VT LEDs + * and triggers. */ void input_led_disconnect(struct input_dev *dev) { -- 2.39.5