diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index da8963a9f044cb68e7230c4ec4da450b22e41a7f..947d440a3be635e0470f69dacf8e4cb523fffc60 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c @@ -499,7 +499,7 @@ static int joydev_handle_JSIOCSBTNMAP(struct joydev *joydev, memcpy(joydev->keypam, keypam, len); for (i = 0; i < joydev->nkey; i++) - joydev->keymap[keypam[i] - BTN_MISC] = i; + joydev->keymap[joydev->keypam[i] - BTN_MISC] = i; out: kfree(keypam);