Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[muen/linux.git] / drivers / input / keyboard / omap4-keypad.c
index 616fdd94b0694a012177f56e47f4be002f8cb58a..840e53732753f556a6f89e7afde3b2c1bf65edcc 100644 (file)
@@ -339,7 +339,8 @@ static int omap4_keypad_probe(struct platform_device *pdev)
 
        keypad_data->row_shift = get_count_order(keypad_data->cols);
        max_keys = keypad_data->rows << keypad_data->row_shift;
-       keypad_data->keymap = kzalloc(max_keys * sizeof(keypad_data->keymap[0]),
+       keypad_data->keymap = kcalloc(max_keys,
+                                     sizeof(keypad_data->keymap[0]),
                                      GFP_KERNEL);
        if (!keypad_data->keymap) {
                dev_err(&pdev->dev, "Not enough memory for keymap\n");