From: Chris Michael Date: Thu, 2 May 2013 01:26:02 +0000 (-0400) Subject: Fix not checking return value of drmIoctl function call to map dumb buffer X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb2074a18bd272b0c8011069f8d510071b95caab;p=profile%2Fivi%2Fweston-ivi-shell.git Fix not checking return value of drmIoctl function call to map dumb buffer in drm_fb_create_dumb, the return value of the drmIoctl function call to map the dumb buffer was never checked, thus the following "if (ret)" check was invalid as it was checking the previous return value from the above drmModeAddFB call. Signed-off-by: Chris Michael --- diff --git a/src/compositor-drm.c b/src/compositor-drm.c index db4db33..a51ac2b 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -268,8 +268,7 @@ drm_fb_create_dumb(struct drm_compositor *ec, unsigned width, unsigned height) memset(&map_arg, 0, sizeof(map_arg)); map_arg.handle = fb->handle; - drmIoctl(fb->fd, DRM_IOCTL_MODE_MAP_DUMB, &map_arg); - + ret = drmIoctl(fb->fd, DRM_IOCTL_MODE_MAP_DUMB, &map_arg); if (ret) goto err_add_fb;