Commit bc3415a
committed
dmaengine: fsl-edma: implement the cleanup path of fsl_edma3_attach_pd()
JIRA: https://issues.redhat.com/browse/RHEL-115725
commit ccfa313
Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Date: Sat Dec 21 16:57:12 2024 +0900
dmaengine: fsl-edma: implement the cleanup path of fsl_edma3_attach_pd()
Current implementation of fsl_edma3_attach_pd() does not provide a
cleanup path, resulting in a memory leak. For example,
dev_pm_domain_detach() is not called after dev_pm_domain_attach_by_id(),
and the device link created with the DL_FLAG_STATELESS is not released
explicitly.
Therefore, provide a cleanup function fsl_edma3_detach_pd() and call it
upon failure. Also add a devm_add_action_or_reset() call with this
function after a successful fsl_edma3_attach_pd().
Fixes: 72f5801 ("dmaengine: fsl-edma: integrate v3 support")
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20241221075712.3297200-1-joe@pf.is.s.u-tokyo.ac.jp
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Jared Kangas <jkangas@redhat.com>1 parent 992a754 commit bc3415a
2 files changed
+37
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
527 | 551 | | |
528 | 552 | | |
529 | 553 | | |
530 | | - | |
531 | 554 | | |
532 | 555 | | |
533 | 556 | | |
| |||
543 | 566 | | |
544 | 567 | | |
545 | 568 | | |
546 | | - | |
| 569 | + | |
547 | 570 | | |
548 | 571 | | |
549 | | - | |
| 572 | + | |
550 | 573 | | |
551 | 574 | | |
552 | | - | |
| 575 | + | |
553 | 576 | | |
554 | | - | |
| 577 | + | |
| 578 | + | |
555 | 579 | | |
556 | 580 | | |
557 | 581 | | |
| |||
562 | 586 | | |
563 | 587 | | |
564 | 588 | | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
565 | 593 | | |
566 | 594 | | |
567 | 595 | | |
| |||
647 | 675 | | |
648 | 676 | | |
649 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
650 | 681 | | |
651 | 682 | | |
652 | 683 | | |
| |||
0 commit comments