mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harry Wentland <hwentlan@amd.com>
To: zhongshiqi <zhong.shiqi@zte.com.cn>,
	"Wentland, Harry" <Harry.Wentland@amd.com>
Cc: "Li, Sun peng (Leo)" <Sunpeng.Li@amd.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>,
	"Zhou, David(ChunMing)" <David1.Zhou@amd.com>,
	"airlied@linux.ie" <airlied@linux.ie>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"Lakha, Bhawanpreet" <Bhawanpreet.Lakha@amd.com>,
	"Lei, Jun" <Jun.Lei@amd.com>,
	"David.Francis@amd.com" <David.Francis@amd.com>,
	"Laktyushkin, Dmytro" <Dmytro.Laktyushkin@amd.com>,
	"Koo, Anthony" <Anthony.Koo@amd.com>,
	"Liu, Wenjing" <Wenjing.Liu@amd.com>,
	"Kazlauskas, Nicholas" <Nicholas.Kazlauskas@amd.com>,
	"Aidan.Wood@amd.com" <Aidan.Wood@amd.com>,
	"Park, Chris" <Chris.Park@amd.com>,
	"Yang, Eric" <Eric.Yang2@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"xue.zhihong@zte.com.cn" <xue.zhihong@zte.com.cn>,
	"wang.yi59@zte.com.cn" <wang.yi59@zte.com.cn>,
	"cheng.shengyu@zte.com.cn" <cheng.shengyu@zte.com.cn>
Subject: Re: [PATCH] dc.c:use kzalloc without test
Date: Wed, 23 Oct 2019 13:35:09 +0000	[thread overview]
Message-ID: <fa46cad1-8845-78b7-eb6a-45942813020b@amd.com> (raw)
In-Reply-To: <1571819543-15676-1-git-send-email-zhong.shiqi@zte.com.cn>

On 2019-10-23 4:32 a.m., zhongshiqi wrote:
> dc.c:583:null check is needed after using kzalloc function
> 
> Signed-off-by: zhongshiqi <zhong.shiqi@zte.com.cn>

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index 5d1aded..4b8819c 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -580,6 +580,10 @@ static bool construct(struct dc *dc,
>  #ifdef CONFIG_DRM_AMD_DC_DCN2_0
>  	// Allocate memory for the vm_helper
>  	dc->vm_helper = kzalloc(sizeof(struct vm_helper), GFP_KERNEL);
> +	if (!dc->vm_helper) {
> +		dm_error("%s: failed to create dc->vm_helper\n", __func__);
> +		goto fail;
> +	}
>  
>  #endif
>  	memcpy(&dc->bb_overrides, &init_params->bb_overrides, sizeof(dc->bb_overrides));
> 

  reply	other threads:[~2019-10-23 13:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-23  8:32 zhongshiqi
2019-10-23 13:35 ` Harry Wentland [this message]
2019-10-25 19:32   ` Alex Deucher

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=fa46cad1-8845-78b7-eb6a-45942813020b@amd.com \
    --to=hwentlan@amd.com \
    --cc=Aidan.Wood@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Anthony.Koo@amd.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=Chris.Park@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=David.Francis@amd.com \
    --cc=David1.Zhou@amd.com \
    --cc=Dmytro.Laktyushkin@amd.com \
    --cc=Eric.Yang2@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Jun.Lei@amd.com \
    --cc=Nicholas.Kazlauskas@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=Wenjing.Liu@amd.com \
    --cc=airlied@linux.ie \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=cheng.shengyu@zte.com.cn \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wang.yi59@zte.com.cn \
    --cc=xue.zhihong@zte.com.cn \
    --cc=zhong.shiqi@zte.com.cn \
    /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

all inboxes | Powered by JetHome®