diff options
author | Matthew Auld <matthew.auld@intel.com> | 2021-07-02 13:46:41 +0300 |
---|---|---|
committer | Matthew Auld <matthew.auld@intel.com> | 2021-07-07 11:52:52 +0300 |
commit | 0c1145e05ce1c38d81f332263186092294ec7d90 (patch) | |
tree | d220de0ae44f52e010e26baa302eb1aca76b61a2 /drivers/gpu/drm/i915/selftests | |
parent | 7e8376f1d1272d1d12ea0b841ae05e21a9a574cc (diff) | |
download | linux-0c1145e05ce1c38d81f332263186092294ec7d90.tar.xz |
drm/i915/selftests: fix smatch warning in igt_check_blocks
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
Diffstat (limited to 'drivers/gpu/drm/i915/selftests')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/i915_buddy.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_buddy.c b/drivers/gpu/drm/i915/selftests/i915_buddy.c index f0f5c4df8dbc..d61ec9c951bf 100644 --- 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; } |