Commit 0c50b7f
firmware: qcom_scm: disable clocks if qcom_scm_bw_enable() fails
There are several functions which are calling qcom_scm_bw_enable()
then returns immediately if the call fails and leaves the clocks
enabled.
Change the code of these functions to disable clocks when the
qcom_scm_bw_enable() call fails. This also fixes a possible dma
buffer leak in the qcom_scm_pas_init_image() function.
Compile tested only due to lack of hardware with interconnect
support.
Cc: stable@vger.kernel.org
Fixes: 65b7ebd ("firmware: qcom_scm: Add bw voting support to the SCM interface")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/20240304-qcom-scm-disable-clk-v1-1-b36e51577ca1@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>1 parent 9f378a6 commit 0c50b7f
1 file changed
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
572 | | - | |
| 572 | + | |
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
577 | | - | |
578 | 577 | | |
| 578 | + | |
| 579 | + | |
579 | 580 | | |
580 | 581 | | |
581 | 582 | | |
| |||
637 | 638 | | |
638 | 639 | | |
639 | 640 | | |
640 | | - | |
| 641 | + | |
641 | 642 | | |
642 | 643 | | |
643 | 644 | | |
| 645 | + | |
| 646 | + | |
644 | 647 | | |
645 | 648 | | |
646 | 649 | | |
| |||
672 | 675 | | |
673 | 676 | | |
674 | 677 | | |
675 | | - | |
| 678 | + | |
676 | 679 | | |
677 | 680 | | |
678 | 681 | | |
| 682 | + | |
| 683 | + | |
679 | 684 | | |
680 | 685 | | |
681 | 686 | | |
| |||
706 | 711 | | |
707 | 712 | | |
708 | 713 | | |
709 | | - | |
| 714 | + | |
710 | 715 | | |
711 | 716 | | |
712 | | - | |
713 | 717 | | |
| 718 | + | |
| 719 | + | |
714 | 720 | | |
715 | 721 | | |
716 | 722 | | |
| |||
0 commit comments