Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1644560
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] drm/i915: Check C for null pointer rather than B |
| Date | 2017-05-18 15:50 +0200 |
| Message-ID | <tItYu-3le-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: Colin Ian King <colin.king@canonical.com>
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>
---
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] drm/i915: Check C for null pointer rather than B Colin King <colin.king@canonical.com> - 2017-05-18 15:50 +0200 Re: [PATCH] drm/i915: Check C for null pointer rather than B Chris Wilson <chris@chris-wilson.co.uk> - 2017-05-18 16:00 +0200
csiph-web