diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2015-10-02 11:12:53 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-10-02 11:44:16 -0700 |
commit | 5702222c9a7af4a207066d54aa95cfe31f34f2f8 (patch) | |
tree | 4e81af9337a13eb55af535cbb028ac6a9b52bf8e /lib/proportions.c | |
parent | aaa59e0911f5624663217c248cfa7cc1c2e33e08 (diff) |
Input: joydev - use memdup_user() to duplicate memory from user-space
The memdup_user() helper function can be used to duplicate a memory region
from user-space to kernel-space. There is no need to open code the same
logic using kmalloc() and copy_from_user() instead. This was found with
make coccicheck that reported the following warning:
drivers/input/joydev.c:447:10-17: WARNING opportunity for memdup_user
drivers/input/joydev.c:483:10-17: WARNING opportunity for memdup_user
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'lib/proportions.c')
0 files changed, 0 insertions, 0 deletions