From: Samuel Thibault Date: Wed, 14 May 2014 00:01:22 +0000 (+1000) Subject: input-route-kbd-leds-through-the-generic-leds-layer-fix X-Git-Tag: next-20140516~2^2~426 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=90fc42e3fd7b023d94aa5f77e723a6f4e12b7b67;p=karo-tx-linux.git input-route-kbd-leds-through-the-generic-leds-layer-fix Signed-off-by: Andrew Morton --- 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) {