Re: [Intel-gfx] [PATCH] drm/i915: Check C for null pointer rather than B

2017-05-18 Thread Chris Wilson
On Thu, May 18, 2017 at 02:39:42PM +0100, Colin King wrote:
> From: Colin Ian King 
> 
> 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 

Thanks, obviously correct and not exercised by BAT so pushed.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915: Check C for null pointer rather than B

2017-05-18 Thread Colin King
From: Colin Ian King 

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 
---
 drivers/gpu/drm/i915/selftests/i915_sw_fence.c | 4 ++--
 1 file 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;
}
-- 
2.11.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx