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: 47624cc330
("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>
This commit is contained in:
parent
0ad4dc887d
commit
ac0a73fb52
|
@ -311,7 +311,7 @@ static int test_AB_C(void *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
C = alloc_fence();
|
C = alloc_fence();
|
||||||
if (!B) {
|
if (!C) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err_B;
|
goto err_B;
|
||||||
}
|
}
|
||||||
|
@ -388,7 +388,7 @@ static int test_C_AB(void *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
C = alloc_fence();
|
C = alloc_fence();
|
||||||
if (!B) {
|
if (!C) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err_B;
|
goto err_B;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue