[Nouveau] [PATCH] drm/nouveau: make sure ret is initialized in nouveau_ttm_io_mem_reserve

Karol Herbst kherbst at redhat.com
Thu Nov 26 14:39:35 UTC 2020


Reviewed-by: Karol Herbst <kherbst at redhat.com>

On Thu, Nov 26, 2020 at 2:11 PM Christian König
<ckoenig.leichtzumerken at gmail.com> wrote:
>
> This wasn't initialized for pre NV50 hardware.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> Reported-and-Tested-by: Mark Hounschell <dmarkh at cfl.rr.com>
> ---
>  drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
> index 7aa4286784ae..42292b3a6eb9 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_bo.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
> @@ -1135,8 +1135,8 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_resource *reg)
>                         }
>
>                         reg->bus.offset = handle;
> -                       ret = 0;
>                 }
> +               ret = 0;
>                 break;
>         default:
>                 ret = -EINVAL;
> --
> 2.25.1
>
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau



More information about the dri-devel mailing list