[-next] drm/i915: Fix return value check in kfence selftests

Submitted by Wei Yongjun on May 19, 2017, 12:26 a.m.

Details

Message ID 20170519002605.29993-1-weiyj.lk@gmail.com
State New
Headers show
Series "drm/i915: Fix return value check in kfence selftests" ( rev: 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Wei Yongjun May 19, 2017, 12:26 a.m.
From: Wei Yongjun <weiyongjun1@huawei.com>

Fix the return value check which testing the wrong variable.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/gpu/drm/i915/selftests/i915_sw_fence.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/selftests/i915_sw_fence.c b/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
index 98baf10..c31d439 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;
 	}

Comments

On Fri, May 19, 2017 at 12:26:05AM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Fix the return value check which testing the wrong variable.

Already fixed up yesterday:

commit ac0a73fb526100adc521ec2069623e47ca3997a8
Author: Colin Ian King <colin.king@canonical.com>
Date:   Thu May 18 14:39:42 2017 +0100

    drm/i915: Check C for null pointer rather than B

Thanks for the patch.
-Chris