freedreno: fix dereference before null check
ptr can actually never be null so just drop the check. CID 1362464 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking ptr suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
@@ -163,8 +163,7 @@ fd_hw_sample_reference(struct fd_context *ctx,
|
||||
|
||||
if (pipe_reference(&(*ptr)->reference, &samp->reference))
|
||||
__fd_hw_sample_destroy(ctx, old_samp);
|
||||
if (ptr)
|
||||
*ptr = samp;
|
||||
*ptr = samp;
|
||||
}
|
||||
|
||||
#endif /* FREEDRENO_QUERY_HW_H_ */
|
||||
|
||||
Reference in New Issue
Block a user