Skip to contentSkip to conversation

drm/exynos: mic: fix an error code

PATCH In review Dan Carpenter 1 participant 1 message Mar 17, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/exynos: mic: fix an error code

We accidentally return success instead of a negative error code here.

---
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.

drivers/gpu/drm/exynos/exynos_drm_mic.c +1 -0
index 9869d70..890c9b1 100644
@@ -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;
 	}