Commit 5a52ae2
committed
dw-dma: commit descriptor count only after successful alloc
The descriptor count was updated before the descriptor buffer was
reallocated, so on allocation failure the count was left larger than the
now-NULL buffer and a later config zeroed a NULL pointer using the stale
count. Update the count only after a successful allocation and reset it
on failure.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>1 parent 3a03392 commit 5a52ae2
1 file changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | | - | |
536 | | - | |
537 | 535 | | |
538 | 536 | | |
539 | 537 | | |
| |||
542 | 540 | | |
543 | 541 | | |
544 | 542 | | |
545 | | - | |
546 | | - | |
| 543 | + | |
547 | 544 | | |
548 | 545 | | |
549 | | - | |
| 546 | + | |
550 | 547 | | |
551 | 548 | | |
552 | 549 | | |
553 | 550 | | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
554 | 556 | | |
555 | 557 | | |
556 | 558 | | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
557 | 562 | | |
558 | 563 | | |
559 | 564 | | |
| |||
0 commit comments