public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] drm/sun4i: dsi: Fix unitialized variable warning
@ 2019-02-08  9:05 Maxime Ripard
  2019-02-08  9:29 ` Maxime Ripard
  0 siblings, 1 reply; 2+ messages in thread
From: Maxime Ripard @ 2019-02-08  9:05 UTC (permalink / raw)
  To: Daniel Vetter, David Airlie
  Cc: Maxime Ripard, Maarten Lankhorst, dri-devel, Chen-Yu Tsai,
	Sean Paul, linux-arm-kernel

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(+)

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;
 	}
 
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/sun4i: dsi: Fix unitialized variable warning
  2019-02-08  9:05 [PATCH] drm/sun4i: dsi: Fix unitialized variable warning Maxime Ripard
@ 2019-02-08  9:29 ` Maxime Ripard
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2019-02-08  9:29 UTC (permalink / raw)
  To: Daniel Vetter, David Airlie
  Cc: Sean Paul, Chen-Yu Tsai, Maarten Lankhorst, linux-arm-kernel,
	dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 579 bytes --]

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

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-08  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-08  9:05 [PATCH] drm/sun4i: dsi: Fix unitialized variable warning Maxime Ripard
2019-02-08  9:29 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox