The driver calls clk_prepare_enable in probe but the corresponding clk_disable_unprepare() is in ti_pipe3_disable_clocks(). Move clk_disable_unprepare() to remove to make them symmetric.
Unified · Split
| @@ -850,6 +850,12 @@ static int ti_pipe3_probe(struct platform_device *pdev) · 849 unmodified lines | ||
| 850 | 850 | |
| 851 | 851 | static int ti_pipe3_remove(struct platform_device *pdev) |
| 852 | 852 | { |
| 853 | + struct ti_pipe3 *phy = platform_get_drvdata(pdev); | |
| 854 | + | |
| 855 | + if (phy->mode == PIPE3_MODE_SATA) { | |
| 856 | + clk_disable_unprepare(phy->refclk); | |
| 857 | + phy->sata_refclk_enabled = false; | |
| 858 | + } | |
| 853 | 859 | pm_runtime_disable(&pdev->dev); |
| 854 | 860 | |
| 855 | 861 | return 0; |
| @@ -900,18 +906,8 @@ static void ti_pipe3_disable_clocks(struct ti_pipe3 *phy) · 44 unmodified lines | ||
| 900 | 906 | { |
| 901 | 907 | if (!IS_ERR(phy->wkupclk)) |
| 902 | 908 | clk_disable_unprepare(phy->wkupclk); |
| 903 | − if (!IS_ERR(phy->refclk)) { | |
| 909 | + if (!IS_ERR(phy->refclk)) | |
| 904 | 910 | clk_disable_unprepare(phy->refclk); |
| 905 | − /* | |
| 906 | − * SATA refclk needs an additional disable as we left it | |
| 907 | − * on in probe to avoid Errata i783 | |
| 908 | − */ | |
| 909 | − if (phy->sata_refclk_enabled) { | |
| 910 | − clk_disable_unprepare(phy->refclk); | |
| 911 | − phy->sata_refclk_enabled = false; | |
| 912 | − } | |
| 913 | − } | |
| 914 | − | |
| 915 | 911 | if (!IS_ERR(phy->div_clk)) |
| 916 | 912 | clk_disable_unprepare(phy->div_clk); |
| 917 | 913 | } |