Commit 29f3ac6
pipeline: fix a potential divizion by zero
If a component doesn't implement .get_attribute(),
pipeline_get_dai_comp_latency() will divide by uninitialised values,
possibly zero. To fix that initialise those fields to 0 and check
that they have been changed to non-zero before division.
Suggested-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>1 parent 53c6bac commit 29f3ac6
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
518 | | - | |
| 517 | + | |
| 518 | + | |
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
533 | | - | |
| 533 | + | |
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
| |||
0 commit comments