dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang@amd.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/scheduler: trivial error handling fix
Date: Tue, 14 Aug 2018 16:23:31 +0800	[thread overview]
Message-ID: <20180814082330.GA16613@hr-amur2> (raw)
In-Reply-To: <20180814081226.76086-1-christian.koenig@amd.com>

On Tue, Aug 14, 2018 at 10:12:23AM +0200, Christian König wrote:
> Return -ENOMEM when allocating the rq_list fails.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>

Reviewed-by: Huang Rui <ray.huang@amd.com>

> ---
>  drivers/gpu/drm/scheduler/gpu_scheduler.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c
> index f566405f49e3..85c1f95752cc 100644
> --- a/drivers/gpu/drm/scheduler/gpu_scheduler.c
> +++ b/drivers/gpu/drm/scheduler/gpu_scheduler.c
> @@ -191,6 +191,9 @@ int drm_sched_entity_init(struct drm_sched_entity *entity,
>  	entity->num_rq_list = num_rq_list;
>  	entity->rq_list = kcalloc(num_rq_list, sizeof(struct drm_sched_rq *),
>  				GFP_KERNEL);
> +	if (!entity->rq_list)
> +		return -ENOMEM;
> +
>  	for (i = 0; i < num_rq_list; ++i)
>  		entity->rq_list[i] = rq_list[i];
>  	entity->last_scheduled = NULL;
> -- 
> 2.14.1
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-08-14  8:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-14  8:12 [PATCH 1/4] drm/scheduler: trivial error handling fix Christian König
     [not found] ` <20180814081226.76086-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-08-14  8:12   ` [PATCH 2/4] drm/scheduler: move entity handling into separate file Christian König
     [not found]     ` <20180814081226.76086-2-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-08-14  8:26       ` Huang Rui
2018-08-14  8:12   ` [PATCH 3/4] drm/scheduler: cleanup entity coding style Christian König
2018-08-14  8:12 ` [PATCH 4/4] drm/scheduler: rename gpu_scheduler.c to sched_main.c Christian König
2018-08-14  8:23 ` Huang Rui [this message]
2018-08-14 16:39   ` [PATCH 1/4] drm/scheduler: trivial error handling fix Andrey Grodzovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180814082330.GA16613@hr-amur2 \
    --to=ray.huang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).