]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/selftests: fix smatch warning in mock_reserve
authorMatthew Auld <matthew.auld@intel.com>
Fri, 2 Jul 2021 10:46:42 +0000 (11:46 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Wed, 7 Jul 2021 08:52:53 +0000 (09:52 +0100)
commitb4e38e18833d3cc01e4ec6d27e1ea975b45182a9
tree150a02abe45427ec8e2ed9ce2a163db160b0437c
parent9ad4a167e4618ecfde00a90e06acb9d5a0f0c206
drm/i915/selftests: fix smatch warning in mock_reserve

If mock_region_create fails then mem will be an error pointer. Instead
we just need to use the correct ordering for the onion unwind.

igt_mock_reserve() error: 'mem' dereferencing possible ERR_PTR()

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210702104642.1189978-2-matthew.auld@intel.com
drivers/gpu/drm/i915/selftests/intel_memory_region.c