Commit 0c1145e0 authored by Matthew Auld's avatar Matthew Auld

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Reviewed-by: default avatarRamalingam C <ramalingam.c@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210702104642.1189978-1-matthew.auld@intel.com
parent 7e8376f1
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment