drm/tegra: Fix comparison operator for buffer size
authorMikko Perttunen <mperttunen@nvidia.com>
Wed, 20 Jun 2018 13:03:58 +0000 (16:03 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:09:14 +0000 (13:09 +0200)
commitf2cbde943d9797f49ff484408e1edb4fd9bccaae
treed48c74a871409c721cfcf79ef4881c3ebcf2776a
parentd3f205d2d3cdbd57b67a16b0dcd197bcf19e6111
drm/tegra: Fix comparison operator for buffer size

[ Upstream commit 5265f0338bc0feec6c0d544dfe005dec1a93cb93 ]

Here we are checking for the buffer length, not an offset for writing
to, so using > is correct. The current code incorrectly rejects a
command buffer ending at the memory buffer's end.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/tegra/drm.c