mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
msm: vidc: Check validity of a timestamp before inserting it to list
In steady state, the first entry in the linked list of timestamps is always invalid. When adding a new timestamp entry, adding the timestamp which is a duplicate of first entry leads to duplicate linked list nodes. To avoid this, check for validity of an entry before inserting duplicates to the linked list. Change-Id: I47dd8fb06b9e4eb307605df6b0e2b352a2e263fe Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
This commit is contained in:
parent
d80c41100d
commit
6b73bf247d
1 changed files with 1 additions and 1 deletions
|
|
@ -7602,7 +7602,7 @@ int msm_comm_store_timestamp(struct msm_vidc_inst *inst, u64 timestamp_us)
|
|||
duplicate = NULL;
|
||||
list_for_each_entry(node, &inst->timestamps.list, list) {
|
||||
count++;
|
||||
if (node->timestamp_us == timestamp_us)
|
||||
if (node->is_valid && node->timestamp_us == timestamp_us)
|
||||
duplicate = node;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue