aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/selftests
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-05-18 14:39:42 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-05-18 14:52:02 +0100
commitac0a73fb526100adc521ec2069623e47ca3997a8 (patch)
tree29557b3834b287b886817f62361f4fc93640cf96 /drivers/gpu/drm/i915/selftests
parentdrm/i915: Fix new -Wint-in-bool-context gcc compiler warning (diff)
downloadlinux-dev-ac0a73fb526100adc521ec2069623e47ca3997a8.tar.xz
linux-dev-ac0a73fb526100adc521ec2069623e47ca3997a8.zip
drm/i915: Check C for null pointer rather than B
There are two occasions where pointer B is being check for a NULL when it should be pointer C instead. Fix these. Detected by CoverityScan, CID#1436348,1436349 ("Logically Dead Code") Fixes: 47624cc3301b60 ("drm/i915: Import the kfence selftests for i915_sw_fence") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170518133942.5660-1-colin.king@canonical.com Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/selftests')
-rw-r--r--drivers/gpu/drm/i915/selftests/i915_sw_fence.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_sw_fence.c b/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
index 98baf10c28c6..c31d439fae3a 100644
--- a/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
+++ b/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
@@ -311,7 +311,7 @@ static int test_AB_C(void *arg)
}
C = alloc_fence();
- if (!B) {
+ if (!C) {
ret = -ENOMEM;
goto err_B;
}
@@ -388,7 +388,7 @@ static int test_C_AB(void *arg)
}
C = alloc_fence();
- if (!B) {
+ if (!C) {
ret = -ENOMEM;
goto err_B;
}