diff mbox

[v2] drm/tilcdc: Fix hardcoded fail-return value in tilcdc_crtc_create()

Message ID 1485882113-6745-1-git-send-email-jsarha@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jyri Sarha Jan. 31, 2017, 5:01 p.m. UTC
Fix badly hardcoded return return value under fail-label. All goto
branches to the label set the "ret"-variable accordingly.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gabriel Krisman Bertazi Jan. 31, 2017, 5:13 p.m. UTC | #1
Jyri Sarha <jsarha@ti.com> writes:

> Fix badly hardcoded return return value under fail-label. All goto
> branches to the label set the "ret"-variable accordingly.
>
> Signed-off-by: Jyri Sarha <jsarha@ti.com>

Thanks. Looks good.

Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
diff mbox

Patch

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
index 3a763f7..9989ea7 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
@@ -1027,5 +1027,5 @@  int tilcdc_crtc_create(struct drm_device *dev)
 
 fail:
 	tilcdc_crtc_destroy(crtc);
-	return -ENOMEM;
+	return ret;
 }