From 0c6fa25a001b735c190b1945e3f4e48560a30b90 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 8 Feb 2019 10:05:40 +0100 Subject: [PATCH] drm/sun4i: dsi: Fix unitialized variable warning 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: 46c8a87d1775 ("sun6i: dsi: Convert to generic phy handling") Reported-by: Stephen Rothwell Reviewed-by: Daniel Vetter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190208090540.19626-1-maxime.ripard@bootlin.com --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 9b7bef6969578..318994cd1b851 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; } -- 2.39.5