[PATCH 2/2] Properly handle drmModeAddFB failure in drmmode_crtc_scanout_allocate

Alex Deucher alexdeucher at gmail.com
Tue Oct 13 07:05:32 PDT 2015


On Tue, Oct 13, 2015 at 5:59 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> We were printing an error message, but not propagating the failure. That
> would probably lead to trouble down the road.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

For the series:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/drmmode_display.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index f010919..4193be4 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -503,6 +503,9 @@ drmmode_crtc_scanout_allocate(xf86CrtcPtr crtc,
>                            bo_handle.u32, &scanout->fb_id);
>         if (ret) {
>                 ErrorF("failed to add rotate fb\n");
> +               amdgpu_bo_unref(&scanout->bo);
> +               scanout->bo = NULL;
> +               return NULL;
>         }
>
>         scanout->width = width;
> --
> 2.6.0
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati


More information about the xorg-driver-ati mailing list