drm: Do not set outparam on error during GEM handle allocation
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 5 Jan 2016 09:42:30 +0000 (09:42 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 5 Jan 2016 15:22:58 +0000 (16:22 +0100)
commit9649399e918f61788a6302a0f7d3c5ed34c2930c
tree4d369e2f20b13caad5c3ed0b78e0c01addc51a58
parentdf7d678bea8ba8904bdb293c8e96aa9488f7dbee
drm: Do not set outparam on error during GEM handle allocation

Good practice dictates that we do not leak stale information to our
callers, and should avoid overwriting an outparam on an error path.

Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1451986951-3703-1-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_gem.c