Skip to content

Commit

Permalink
drm/stm: ltdc: Cleanup rename returned value
Browse files Browse the repository at this point in the history
Rename the returned value from "res" to "ret" as it is more "readable".

Signed-off-by: Philippe CORNU <philippe.cornu@st.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1500552357-29487-7-git-send-email-philippe.cornu@st.com
  • Loading branch information
Philippe CORNU authored and Benjamin Gaignard committed Jul 26, 2017
1 parent 589b648 commit dc5e0cd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/gpu/drm/stm/ltdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,17 +760,17 @@ static int ltdc_crtc_init(struct drm_device *ddev, struct drm_crtc *crtc)
struct ltdc_device *ldev = ddev->dev_private;
struct drm_plane *primary, *overlay;
unsigned int i;
int res;
int ret;

primary = ltdc_plane_create(ddev, DRM_PLANE_TYPE_PRIMARY);
if (!primary) {
DRM_ERROR("Can not create primary plane\n");
return -EINVAL;
}

res = drm_crtc_init_with_planes(ddev, crtc, primary, NULL,
ret = drm_crtc_init_with_planes(ddev, crtc, primary, NULL,
&ltdc_crtc_funcs, NULL);
if (res) {
if (ret) {
DRM_ERROR("Can not initialize CRTC\n");
goto cleanup;
}
Expand All @@ -783,7 +783,7 @@ static int ltdc_crtc_init(struct drm_device *ddev, struct drm_crtc *crtc)
for (i = 1; i < ldev->caps.nb_layers; i++) {
overlay = ltdc_plane_create(ddev, DRM_PLANE_TYPE_OVERLAY);
if (!overlay) {
res = -ENOMEM;
ret = -ENOMEM;
DRM_ERROR("Can not create overlay plane %d\n", i);
goto cleanup;
}
Expand All @@ -793,7 +793,7 @@ static int ltdc_crtc_init(struct drm_device *ddev, struct drm_crtc *crtc)

cleanup:
ltdc_plane_destroy_all(ddev);
return res;
return ret;
}

/*
Expand Down

0 comments on commit dc5e0cd

Please sign in to comment.