drm/tegra: Check syncpoint ID in the 'submit' IOCTL
authorDmitry Osipenko <digetx@gmail.com>
Wed, 14 Jun 2017 23:18:28 +0000 (02:18 +0300)
committerThierry Reding <treding@nvidia.com>
Thu, 15 Jun 2017 12:17:21 +0000 (14:17 +0200)
commite0b2ce02108498e41e8956d29ea4c27f16dbf9e0
treeafe334d4e5d5280b31e563605df95dae85061c4f
parentd0fbbdff2e19aabccc1107b7e12ab9f3cbf626ef
drm/tegra: Check syncpoint ID in the 'submit' IOCTL

In case of invalid syncpoint ID, the host1x_syncpt_get() returns NULL and
none of its users perform a check of the returned pointer later. Let's bail
out until it's too late.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/drm.c