panfrost/drm: Check allocation size is positive
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 11 Jul 2019 17:53:37 +0000 (10:53 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 12 Jul 2019 22:31:47 +0000 (15:31 -0700)
commit085004cc2caa4fd3db9fadf57f6004b11ef5866a
treec3a03574dda81bb7dc94b75123743b7159560ed1
parent8419621176502f906aac80601eecfcdce5324ff4
panfrost/drm: Check allocation size is positive

Zero-sized allocations will fail with an unhelpful errno from the
kernel; check size explicitly in userspace before it gets that far.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_drm.c