[DRM] Patch for Compositor Drm

Ander Conselvan de Oliveira conselvan2 at gmail.com
Tue Apr 23 02:17:23 PDT 2013


Hi,

Thanks for fixing this.

Just a small nitpick about the commit message. We keep the summary line 
below 76 characters because of git log, and we also prefix it with the 
component to which the change was made. In this particular case, I would 
go with something like

compositor-drm: Check return value of drmIoctl() in drm_fb_create_dumb()

Thanks,
Ander


On 04/22/2013 07:12 PM, Christopher Michael wrote:
>  From acb79e4a5921525b35e07e48f7f903e42a08fb7c Mon Sep 17 00:00:00 2001
> From: Chris Michael <cp.michael at samsung.com>
> Date: Mon, 22 Apr 2013 15:22:48 +0100
> Subject: [PATCH] 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 <cp.michael at samsung.com>
> ---
>   src/compositor-drm.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/compositor-drm.c b/src/compositor-drm.c
> index da1ba79..13b9d79 100644
> --- a/src/compositor-drm.c
> +++ b/src/compositor-drm.c
> @@ -255,7 +255,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;



More information about the wayland-devel mailing list