drm/i2c: tda9950: Remove VLA usage
commit699112f5e831c088ff6aeea594d23ebecf6bd806
authorKees Cook <keescook@chromium.org>
Wed, 20 Jun 2018 04:38:31 +0000 (19 21:38 -0700)
committerKees Cook <keescook@chromium.org>
Mon, 13 Aug 2018 20:40:52 +0000 (13 13:40 -0700)
tree812e84b4f90d1870258b94ca288f13a539ddcaa2
parent7daf201d7fe8334e2d2364d4e8ed3394ec9af819
drm/i2c: tda9950: Remove VLA usage

In the quest to remove all stack VLA usage from the kernel[1], this
sets the buffer to maximum size and adds a sanity check.

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

Cc: David Airlie <airlied@linux.ie>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Kees Cook <keescook@chromium.org>
drivers/gpu/drm/i2c/tda9950.c