summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/via/via_aux_vt1632.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-03-12 17:06:55 +0100
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2018-03-12 17:06:55 +0100
commit2c81ee0a28c085582a84f3822e8a22e028a909d0 (patch)
tree794625cc6801450ba4b7781d1a0cd4a7008e338b /drivers/video/fbdev/via/via_aux_vt1632.c
parentdf7a84a8baf1caf01ded61356b68d5d978b37789 (diff)
downloadlinux-2c81ee0a28c085582a84f3822e8a22e028a909d0.tar.bz2
video: fbdev: via: remove VLA usage
In preparation to enabling -Wvla, remove VLA usage. Also, fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Kees Cook <keescook@chromium.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video/fbdev/via/via_aux_vt1632.c')
-rw-r--r--drivers/video/fbdev/via/via_aux_vt1632.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/via/via_aux_vt1632.c b/drivers/video/fbdev/via/via_aux_vt1632.c
index d24f4cd97401..cec8cc43d524 100644
--- a/drivers/video/fbdev/via/via_aux_vt1632.c
+++ b/drivers/video/fbdev/via/via_aux_vt1632.c
@@ -36,7 +36,7 @@ static void probe(struct via_aux_bus *bus, u8 addr)
.name = name};
/* check vendor id and device id */
const u8 id[] = {0x06, 0x11, 0x92, 0x31}, len = ARRAY_SIZE(id);
- u8 tmp[len];
+ u8 tmp[ARRAY_SIZE(id)];
if (!via_aux_read(&drv, 0x00, tmp, len) || memcmp(id, tmp, len))
return;