diff mbox

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

Message ID 20170519002605.29993-1-weiyj.lk@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Yongjun May 19, 2017, 12:26 a.m. UTC
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(-)

Comments

Chris Wilson May 19, 2017, 7:41 a.m. UTC | #1
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
diff mbox

Patch

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;
 	}