Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-microblaze.git] / drivers / input / joystick / joydump.c
index 2ea05ad..344ab44 100644 (file)
@@ -76,7 +76,7 @@ static int joydump_connect(struct gameport *gameport, struct gameport_driver *dr
 
        timeout = gameport_time(gameport, 10000); /* 10 ms */
 
-       buf = kmalloc(BUF_SIZE * sizeof(struct joydump), GFP_KERNEL);
+       buf = kmalloc_array(BUF_SIZE, sizeof(struct joydump), GFP_KERNEL);
        if (!buf) {
                printk(KERN_INFO "joydump: no memory for testing\n");
                goto jd_end;