File tree Expand file tree Collapse file tree 2 files changed +19
-15
lines changed Expand file tree Collapse file tree 2 files changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -1773,8 +1773,9 @@ static int exynos_dsi_probe(struct platform_device *pdev)
1773
1773
ret = devm_regulator_bulk_get (dev , ARRAY_SIZE (dsi -> supplies ),
1774
1774
dsi -> supplies );
1775
1775
if (ret ) {
1776
- dev_info (dev , "failed to get regulators: %d\n" , ret );
1777
- return - EPROBE_DEFER ;
1776
+ if (ret != - EPROBE_DEFER )
1777
+ dev_info (dev , "failed to get regulators: %d\n" , ret );
1778
+ return ret ;
1778
1779
}
1779
1780
1780
1781
dsi -> clks = devm_kcalloc (dev ,
@@ -1787,9 +1788,10 @@ static int exynos_dsi_probe(struct platform_device *pdev)
1787
1788
dsi -> clks [i ] = devm_clk_get (dev , clk_names [i ]);
1788
1789
if (IS_ERR (dsi -> clks [i ])) {
1789
1790
if (strcmp (clk_names [i ], "sclk_mipi" ) == 0 ) {
1790
- strcpy (clk_names [i ], OLD_SCLK_MIPI_CLK_NAME );
1791
- i -- ;
1792
- continue ;
1791
+ dsi -> clks [i ] = devm_clk_get (dev ,
1792
+ OLD_SCLK_MIPI_CLK_NAME );
1793
+ if (!IS_ERR (dsi -> clks [i ]))
1794
+ continue ;
1793
1795
}
1794
1796
1795
1797
dev_info (dev , "failed to get the clock: %s\n" ,
Original file line number Diff line number Diff line change @@ -1805,18 +1805,10 @@ static int hdmi_resources_init(struct hdmi_context *hdata)
1805
1805
1806
1806
hdata -> reg_hdmi_en = devm_regulator_get_optional (dev , "hdmi-en" );
1807
1807
1808
- if (PTR_ERR (hdata -> reg_hdmi_en ) != - ENODEV ) {
1808
+ if (PTR_ERR (hdata -> reg_hdmi_en ) != - ENODEV )
1809
1809
if (IS_ERR (hdata -> reg_hdmi_en ))
1810
1810
return PTR_ERR (hdata -> reg_hdmi_en );
1811
1811
1812
- ret = regulator_enable (hdata -> reg_hdmi_en );
1813
- if (ret ) {
1814
- DRM_DEV_ERROR (dev ,
1815
- "failed to enable hdmi-en regulator\n" );
1816
- return ret ;
1817
- }
1818
- }
1819
-
1820
1812
return hdmi_bridge_init (hdata );
1821
1813
}
1822
1814
@@ -2023,6 +2015,15 @@ static int hdmi_probe(struct platform_device *pdev)
2023
2015
}
2024
2016
}
2025
2017
2018
+ if (!IS_ERR (hdata -> reg_hdmi_en )) {
2019
+ ret = regulator_enable (hdata -> reg_hdmi_en );
2020
+ if (ret ) {
2021
+ DRM_DEV_ERROR (dev ,
2022
+ "failed to enable hdmi-en regulator\n" );
2023
+ goto err_hdmiphy ;
2024
+ }
2025
+ }
2026
+
2026
2027
pm_runtime_enable (dev );
2027
2028
2028
2029
audio_infoframe = & hdata -> audio .infoframe ;
@@ -2047,7 +2048,8 @@ static int hdmi_probe(struct platform_device *pdev)
2047
2048
2048
2049
err_rpm_disable :
2049
2050
pm_runtime_disable (dev );
2050
-
2051
+ if (!IS_ERR (hdata -> reg_hdmi_en ))
2052
+ regulator_disable (hdata -> reg_hdmi_en );
2051
2053
err_hdmiphy :
2052
2054
if (hdata -> hdmiphy_port )
2053
2055
put_device (& hdata -> hdmiphy_port -> dev );
You can’t perform that action at this time.
0 commit comments