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:07:03 +0000 (13:07 +0200)
commit0c5a08372faf7b587eb952ad697e7bd9d7480448
tree2e6f54c107ff7d84ce4946dd7353845178f7e0a6
parent7be437a4a72c95621d2c5b511a4900cc9ae5e47a
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