diff mbox series

drm/sun4i: dsi: Fix unitialized variable warning

Message ID 20190208090540.19626-1-maxime.ripard@bootlin.com (mailing list archive)
State Mainlined, archived
Commit 1c7c62a37a5fc50599e1aa7e72dd0fc785fc958a
Headers show
Series drm/sun4i: dsi: Fix unitialized variable warning | expand

Commit Message

Maxime Ripard Feb. 8, 2019, 9:05 a.m. UTC
Since the DPHY rework, one error path doesn't set the return error code
before jumping to its error label, which in turns make gcc (rightfully)
complain about the variable holding the error code being uninitialized.

Fix this.

Fixes: bb3b6fcb6849 ("sun6i: dsi: Convert to generic phy handling")
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
 drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Maxime Ripard Feb. 8, 2019, 9:29 a.m. UTC | #1
On Fri, Feb 08, 2019 at 10:05:40AM +0100, Maxime Ripard wrote:
> Since the DPHY rework, one error path doesn't set the return error code
> before jumping to its error label, which in turns make gcc (rightfully)
> complain about the variable holding the error code being uninitialized.
> 
> Fix this.
> 
> Fixes: bb3b6fcb6849 ("sun6i: dsi: Convert to generic phy handling")
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>

Applied with Daniel's Reviewed-by

Maxime
diff mbox series

Patch

diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
index 9b7bef696957..318994cd1b85 100644
--- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
+++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
@@ -1025,6 +1025,7 @@  static int sun6i_dsi_probe(struct platform_device *pdev)
 	dsi->dphy = devm_phy_get(dev, "dphy");
 	if (IS_ERR(dsi->dphy)) {
 		dev_err(dev, "Couldn't get the MIPI D-PHY\n");
+		ret = PTR_ERR(dsi->dphy);
 		goto err_unprotect_clk;
 	}