diff options
author | Rob Clark <[email protected]> | 2016-06-02 10:33:08 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-06-02 15:44:07 -0400 |
commit | ba452d43e0f5ee6ceec5da031f55904f8144472c (patch) | |
tree | a4a4be80638fab200071ccb018e499de1f0b456e /src/gallium/drivers | |
parent | 228b2b36f4574a362357270204a23ddaeb765465 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_query_hw.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_query_hw.h b/src/gallium/drivers/freedreno/freedreno_query_hw.h index 8a5d114d806..095140ea033 100644 --- a/src/gallium/drivers/freedreno/freedreno_query_hw.h +++ b/src/gallium/drivers/freedreno/freedreno_query_hw.h @@ -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_ */ |