aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Philipp Stanner <pstanner@redhat.com> 2023-11-02 20:24:03 +0100
committerGravatar Helge Deller <deller@gmx.de> 2023-11-07 14:42:34 +0100
commit3e91a38de1dce97b385d732a5f444264ea8fbd92 (patch)
treea71914ac4be9317017d510c43b9512ae7a8622c3
parentfbdev: omapfb: Drop unused remove function (diff)
downloadlinux-3e91a38de1dce97b385d732a5f444264ea8fbd92.tar.gz
linux-3e91a38de1dce97b385d732a5f444264ea8fbd92.tar.bz2
linux-3e91a38de1dce97b385d732a5f444264ea8fbd92.zip
fbdev: viafb: use new array-copying-wrapper
viafbdev.c utilizes memdup_user() to copy an array from userspace. There is a new wrapper, specifically designed for copying arrays. Use this one instead. Suggested-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Philipp Stanner <pstanner@redhat.com> Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--drivers/video/fbdev/via/viafbdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/via/viafbdev.c b/drivers/video/fbdev/via/viafbdev.c
index 58868f8880d6..a52b1ba43a48 100644
--- a/drivers/video/fbdev/via/viafbdev.c
+++ b/drivers/video/fbdev/via/viafbdev.c
@@ -574,7 +574,7 @@ static int viafb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
break;
case VIAFB_SET_GAMMA_LUT:
- viafb_gamma_table = memdup_user(argp, 256 * sizeof(u32));
+ viafb_gamma_table = memdup_array_user(argp, 256, sizeof(u32));
if (IS_ERR(viafb_gamma_table))
return PTR_ERR(viafb_gamma_table);
viafb_set_gamma_table(viafb_bpp, viafb_gamma_table);