* [patch 1/2] drm/exynos: mic: fix an error code
@ 2016-03-17 10:32 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-03-17 10:32 UTC (permalink / raw)
To: Inki Dae
Cc: Joonyoung Shim, Seung-Woo Kim, Kyungmin Park, David Airlie,
Kukjin Kim, Krzysztof Kozlowski, dri-devel, linux-samsung-soc,
linux-kernel, kernel-janitors
We accidentally return success instead of a negative error code here.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
This is the common problem introduced by do nothing gotos. The other
issue with do nothing gotos is that they are annoying and don't actually
prevent people from putting a direct return in the middle of functions.
diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c
index 9869d70..890c9b1 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_mic.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c
@@ -457,6 +457,7 @@ static int exynos_mic_probe(struct platform_device *pdev)
"samsung,disp-syscon");
if (IS_ERR(mic->sysreg)) {
DRM_ERROR("mic: Failed to get system register.\n");
+ ret = PTR_ERR(mic->sysreg);
goto err;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-03-17 10:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-17 10:32 [patch 1/2] drm/exynos: mic: fix an error code Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox