projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e8376f
)
drm/i915/selftests: fix smatch warning in igt_check_blocks
author
Matthew Auld
<matthew.auld@intel.com>
Fri, 2 Jul 2021 10:46:41 +0000
(11:46 +0100)
committer
Matthew Auld
<matthew.auld@intel.com>
Wed, 7 Jul 2021 08:52:52 +0000
(09:52 +0100)
The block here can't be NULL, especially since we already dereferenced
it earlier, so remove the redundant check.
igt_check_blocks() warn: variable dereferenced before check 'block' (see line 126)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20210702104642.1189978-1-matthew.auld@intel.com
drivers/gpu/drm/i915/selftests/i915_buddy.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/selftests/i915_buddy.c
b/drivers/gpu/drm/i915/selftests/i915_buddy.c
index f0f5c4df8dbc781c7fac302ebbfaec1329123392..d61ec9c951bf829409cfa5291a0e26a537cb8d2b 100644
(file)
--- a/
drivers/gpu/drm/i915/selftests/i915_buddy.c
+++ b/
drivers/gpu/drm/i915/selftests/i915_buddy.c
@@
-166,10
+166,8
@@
static int igt_check_blocks(struct i915_buddy_mm *mm,
igt_dump_block(mm, prev);
}
- if (block) {
- pr_err("bad block, dump:\n");
- igt_dump_block(mm, block);
- }
+ pr_err("bad block, dump:\n");
+ igt_dump_block(mm, block);
return err;
}