diff options
Diffstat (limited to 'render/allocator/drm_dumb.c')
-rw-r--r-- | render/allocator/drm_dumb.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/render/allocator/drm_dumb.c b/render/allocator/drm_dumb.c index 27aa1a8d..024e5d4f 100644 --- a/render/allocator/drm_dumb.c +++ b/render/allocator/drm_dumb.c @@ -55,20 +55,20 @@ static struct wlr_drm_dumb_buffer *create_buffer( return NULL; } - struct wlr_drm_dumb_buffer *buffer = calloc(1, sizeof(*buffer)); - if (buffer == NULL) { - return NULL; - } - wlr_buffer_init(&buffer->base, &buffer_impl, width, height); - wl_list_insert(&alloc->buffers, &buffer->link); - const struct wlr_pixel_format_info *info = drm_get_pixel_format_info(format->format); if (info == NULL) { wlr_log(WLR_ERROR, "DRM format 0x%"PRIX32" not supported", format->format); - goto create_err; + return NULL; + } + + struct wlr_drm_dumb_buffer *buffer = calloc(1, sizeof(*buffer)); + if (buffer == NULL) { + return NULL; } + wlr_buffer_init(&buffer->base, &buffer_impl, width, height); + wl_list_insert(&alloc->buffers, &buffer->link); struct drm_mode_create_dumb create = {0}; create.width = (uint32_t)width; |