mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
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
This commit is contained in:
parent
7e8376f1d1
commit
0c1145e05c
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user