summaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/joydump.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/joystick/joydump.c')
-rw-r--r--drivers/input/joystick/joydump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/joystick/joydump.c b/drivers/input/joystick/joydump.c
index 2ea05ade4d4e..344ab44ff581 100644
--- a/drivers/input/joystick/joydump.c
+++ b/drivers/input/joystick/joydump.c
@@ -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;
OpenPOWER on IntegriCloud