]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gtt: set err to -ENOMEM on memory allocation failure
authorColin Ian King <colin.king@canonical.com>
Fri, 24 May 2019 21:26:27 +0000 (22:26 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 27 May 2019 09:27:34 +0000 (10:27 +0100)
commit4a3f039dec82903741ed4395e8d3655ddf08d05d
treeb0d176c0e8962377f51205d889b9f3800ac43cbb
parent9e192faa277cc41c91de3c93457e64c8e3eee47b
drm/i915/gtt: set err to -ENOMEM on memory allocation failure

Currently when the allocation of ppgtt->work fails the error return
path via err_free returns an uninitialized value in err. Fix this
by setting err to the appropriate error return of -ENOMEM.

Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: c428794718c3 ("drm/i915/gtt: Always acquire struct_mutex for gen6_ppgtt_cleanup")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190524212627.24256-1-colin.king@canonical.com
drivers/gpu/drm/i915/i915_gem_gtt.c