Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1359722 > unrolled thread
| Started by | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| First post | 2016-03-17 11:40 +0100 |
| Last post | 2016-03-17 11:40 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[patch 1/2] drm/exynos: mic: fix an error code Dan Carpenter <dan.carpenter@oracle.com> - 2016-03-17 11:40 +0100
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2016-03-17 11:40 +0100 |
| Subject | [patch 1/2] drm/exynos: mic: fix an error code |
| Message-ID | <rdDvs-6cc-27@gated-at.bofh.it> |
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;
}
Back to top | Article view | linux.kernel
csiph-web