* [PATCH] dc.c:use kzalloc without test
@ 2019-10-23 8:32 ` zhongshiqi
0 siblings, 0 replies; 14+ messages in thread
From: zhongshiqi @ 2019-10-23 8:32 UTC (permalink / raw)
To: harry.wentland
Cc: sunpeng.li, alexander.deucher, christian.koenig, David1.Zhou,
airlied, daniel, Bhawanpreet.Lakha, Jun.Lei, David.Francis,
Dmytro.Laktyushkin, anthony.koo, Wenjing.Liu,
nicholas.kazlauskas, Aidan.Wood, Chris.Park, Eric.Yang2, amd-gfx,
dri-devel, linux-kernel, xue.zhihong, wang.yi59, cheng.shengyu,
zhongshiqi
dc.c:583:null check is needed after using kzalloc function
Signed-off-by: zhongshiqi <zhong.shiqi@zte.com.cn>
---
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));
--
2.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH] dc.c:use kzalloc without test
@ 2019-10-23 8:32 ` zhongshiqi
0 siblings, 0 replies; 14+ messages in thread
From: zhongshiqi @ 2019-10-23 8:32 UTC (permalink / raw)
To: harry.wentland
Cc: airlied, dri-devel, Jun.Lei, anthony.koo, David.Francis,
Wenjing.Liu, amd-gfx, cheng.shengyu, zhongshiqi, wang.yi59,
sunpeng.li, Aidan.Wood, xue.zhihong, Bhawanpreet.Lakha,
Chris.Park, Eric.Yang2, linux-kernel, christian.koenig,
Dmytro.Laktyushkin, alexander.deucher, nicholas.kazlauskas
dc.c:583:null check is needed after using kzalloc function
Signed-off-by: zhongshiqi <zhong.shiqi@zte.com.cn>
---
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));
--
2.9.5
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH] dc.c:use kzalloc without test
@ 2019-10-23 8:32 ` zhongshiqi
0 siblings, 0 replies; 14+ messages in thread
From: zhongshiqi @ 2019-10-23 8:32 UTC (permalink / raw)
To: harry.wentland
Cc: airlied, dri-devel, Jun.Lei, anthony.koo, David1.Zhou,
David.Francis, Wenjing.Liu, amd-gfx, cheng.shengyu, zhongshiqi,
wang.yi59, sunpeng.li, Aidan.Wood, xue.zhihong,
Bhawanpreet.Lakha, Chris.Park, Eric.Yang2, linux-kernel,
christian.koenig, Dmytro.Laktyushkin, daniel, alexander.deucher,
nicholas.kazlauskas
dc.c:583:null check is needed after using kzalloc function
Signed-off-by: zhongshiqi <zhong.shiqi@zte.com.cn>
---
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));
--
2.9.5
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] dc.c:use kzalloc without test
2019-10-23 8:32 ` zhongshiqi
(?)
(?)
@ 2019-10-23 13:35 ` Harry Wentland
-1 siblings, 0 replies; 14+ messages in thread
From: Harry Wentland @ 2019-10-23 13:35 UTC (permalink / raw)
To: zhongshiqi, Wentland, Harry
Cc: Li, Sun peng (Leo),
Deucher, Alexander, Koenig, Christian, Zhou, David(ChunMing),
airlied, daniel, Lakha, Bhawanpreet, Lei, Jun, David.Francis,
Laktyushkin, Dmytro, Koo, Anthony, Liu, Wenjing, Kazlauskas,
Nicholas, Aidan.Wood, Park, Chris, Yang, Eric, amd-gfx,
dri-devel, linux-kernel, xue.zhihong, wang.yi59, cheng.shengyu
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));
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] dc.c:use kzalloc without test
@ 2019-10-23 13:35 ` Harry Wentland
0 siblings, 0 replies; 14+ messages in thread
From: Harry Wentland @ 2019-10-23 13:35 UTC (permalink / raw)
To: zhongshiqi, Wentland, Harry
Cc: airlied, dri-devel, Lei, Jun, Koo, Anthony, David.Francis, Liu,
Wenjing, amd-gfx, cheng.shengyu, wang.yi59, Li, Sun peng (Leo),
Aidan.Wood, xue.zhihong, Lakha, Bhawanpreet, Park, Chris, Yang,
Eric, linux-kernel, Koenig, Christian, Laktyushkin, Dmytro,
Deucher, Alexander
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));
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] dc.c:use kzalloc without test
@ 2019-10-23 13:35 ` Harry Wentland
0 siblings, 0 replies; 14+ messages in thread
From: Harry Wentland @ 2019-10-23 13:35 UTC (permalink / raw)
To: zhongshiqi, Wentland, Harry
Cc: airlied, dri-devel, Lei, Jun, Koo, Anthony, David.Francis, Liu,
Wenjing, amd-gfx, cheng.shengyu, wang.yi59, Li, Sun peng (Leo),
Aidan.Wood, xue.zhihong, Lakha, Bhawanpreet, Park, Chris, Yang,
Eric, linux-kernel, Koenig, Christian, Laktyushkin, Dmytro,
Deucher, Alexander, Kazlauskas, Nicholas
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));
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] dc.c:use kzalloc without test
@ 2019-10-23 13:35 ` Harry Wentland
0 siblings, 0 replies; 14+ messages in thread
From: Harry Wentland @ 2019-10-23 13:35 UTC (permalink / raw)
To: zhongshiqi, Wentland, Harry
Cc: airlied, dri-devel, Lei, Jun, Koo, Anthony, Zhou, David(ChunMing),
David.Francis, Liu, Wenjing, amd-gfx, cheng.shengyu, wang.yi59,
Li, Sun peng (Leo),
Aidan.Wood, xue.zhihong, Lakha, Bhawanpreet, Park, Chris, Yang,
Eric, linux-kernel, Koenig, Christian, Laktyushkin, Dmytro,
daniel, Deucher, Alexander, Kazlauskas, Nicholas
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));
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] dc.c:use kzalloc without test
2019-10-23 13:35 ` Harry Wentland
(?)
(?)
@ 2019-10-25 19:32 ` Alex Deucher
-1 siblings, 0 replies; 14+ messages in thread
From: Alex Deucher @ 2019-10-25 19:32 UTC (permalink / raw)
To: Harry Wentland
Cc: zhongshiqi, Wentland, Harry, airlied, dri-devel, Lei, Jun, Koo,
Anthony, Zhou, David(ChunMing),
David.Francis, Liu, Wenjing, amd-gfx, cheng.shengyu, wang.yi59,
Li, Sun peng (Leo),
Aidan.Wood, xue.zhihong, Lakha, Bhawanpreet, Park, Chris, Yang,
Eric, linux-kernel, Koenig, Christian, Laktyushkin, Dmytro,
daniel, Deucher, Alexander, Kazlauskas, Nicholas
Applied. thanks!
Alex
On Wed, Oct 23, 2019 at 9:35 AM Harry Wentland <hwentlan@amd.com> wrote:
>
> 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));
> >
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] dc.c:use kzalloc without test
@ 2019-10-25 19:32 ` Alex Deucher
0 siblings, 0 replies; 14+ messages in thread
From: Alex Deucher @ 2019-10-25 19:32 UTC (permalink / raw)
To: Harry Wentland
Cc: airlied, dri-devel, Lei, Jun, Koo, Anthony, David.Francis, Liu,
Wenjing, amd-gfx, cheng.shengyu, zhongshiqi, wang.yi59, Li,
Sun peng (Leo),
Aidan.Wood, xue.zhihong, Lakha, Bhawanpreet, Park, Chris, Yang,
Eric, linux-kernel, Kazlauskas, Nicholas, Laktyushkin, Dmytro
Applied. thanks!
Alex
On Wed, Oct 23, 2019 at 9:35 AM Harry Wentland <hwentlan@amd.com> wrote:
>
> 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));
> >
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] dc.c:use kzalloc without test
@ 2019-10-25 19:32 ` Alex Deucher
0 siblings, 0 replies; 14+ messages in thread
From: Alex Deucher @ 2019-10-25 19:32 UTC (permalink / raw)
To: Harry Wentland
Cc: airlied, dri-devel, Lei, Jun, Koo, Anthony, David.Francis, Liu,
Wenjing, amd-gfx, cheng.shengyu, zhongshiqi, wang.yi59, Li,
Sun peng (Leo),
Aidan.Wood, xue.zhihong, Lakha, Bhawanpreet, Park, Chris, Yang,
Eric, linux-kernel, Kazlauskas, Nicholas, Laktyushkin, Dmytro,
Deucher, Alexander, Koenig, Christian
Applied. thanks!
Alex
On Wed, Oct 23, 2019 at 9:35 AM Harry Wentland <hwentlan@amd.com> wrote:
>
> 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));
> >
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] dc.c:use kzalloc without test
@ 2019-10-25 19:32 ` Alex Deucher
0 siblings, 0 replies; 14+ messages in thread
From: Alex Deucher @ 2019-10-25 19:32 UTC (permalink / raw)
To: Harry Wentland
Cc: airlied, dri-devel, Lei, Jun, Koo, Anthony, Zhou, David(ChunMing),
David.Francis, Liu, Wenjing, amd-gfx, cheng.shengyu, zhongshiqi,
Wentland, Harry, wang.yi59, Li, Sun peng (Leo),
Aidan.Wood, xue.zhihong, Lakha, Bhawanpreet, Park, Chris, Yang,
Eric, linux-kernel, Kazlauskas, Nicholas, Laktyushkin, Dmytro,
daniel, Deucher, Alexander, Koenig, Christian
Applied. thanks!
Alex
On Wed, Oct 23, 2019 at 9:35 AM Harry Wentland <hwentlan@amd.com> wrote:
>
> 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));
> >
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] dc.c:use kzalloc without test
@ 2019-10-26 2:57 ` zhong.shiqi
0 siblings, 0 replies; 14+ messages in thread
From: zhong.shiqi @ 2019-10-26 2:57 UTC (permalink / raw)
To: alexdeucher
Cc: airlied, dri-devel, Jun.Lei, Anthony.Koo, Bhawanpreet.Lakha,
David.Francis, Wenjing.Liu, amd-gfx, cheng.shengyu, wang.yi59,
Sunpeng.Li, Aidan.Wood, xue.zhihong, hwentlan, Chris.Park,
Eric.Yang2, linux-kernel, Nicholas.Kazlauskas,
Dmytro.Laktyushkin, Alexander.Deucher, Christian.Koenig
[-- Attachment #1.1: Type: text/plain, Size: 1423 bytes --]
> Applied. thanks!
>
> Alex
Thanks a lot!
zhong.shiqi
> On Wed, Oct 23, 2019 at 9:35 AM Harry Wentland <hwentlan@amd.com> wrote:
> >
> > 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));
> > >
> > _______________________________________________
> > amd-gfx mailing list
> > amd-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] dc.c:use kzalloc without test
@ 2019-10-26 2:57 ` zhong.shiqi
0 siblings, 0 replies; 14+ messages in thread
From: zhong.shiqi @ 2019-10-26 2:57 UTC (permalink / raw)
To: alexdeucher
Cc: airlied, dri-devel, Jun.Lei, Anthony.Koo, Bhawanpreet.Lakha,
David.Francis, Wenjing.Liu, amd-gfx, cheng.shengyu, wang.yi59,
Sunpeng.Li, Aidan.Wood, xue.zhihong, hwentlan, Chris.Park,
Eric.Yang2, linux-kernel, Nicholas.Kazlauskas,
Dmytro.Laktyushkin, Alexander.Deucher, Christian.Koenig
[-- Attachment #1.1: Type: text/plain, Size: 1423 bytes --]
> Applied. thanks!
>
> Alex
Thanks a lot!
zhong.shiqi
> On Wed, Oct 23, 2019 at 9:35 AM Harry Wentland <hwentlan@amd.com> wrote:
> >
> > 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));
> > >
> > _______________________________________________
> > amd-gfx mailing list
> > amd-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] dc.c:use kzalloc without test
@ 2019-10-26 2:57 ` zhong.shiqi
0 siblings, 0 replies; 14+ messages in thread
From: zhong.shiqi @ 2019-10-26 2:57 UTC (permalink / raw)
To: alexdeucher
Cc: airlied, dri-devel, Jun.Lei, Anthony.Koo, David1.Zhou,
Bhawanpreet.Lakha, David.Francis, Wenjing.Liu, amd-gfx,
cheng.shengyu, Harry.Wentland, wang.yi59, Sunpeng.Li, Aidan.Wood,
xue.zhihong, hwentlan, Chris.Park, Eric.Yang2, linux-kernel,
Nicholas.Kazlauskas, Dmytro.Laktyushkin, daniel,
Alexander.Deucher, Christian.Koenig
[-- Attachment #1.1: Type: text/plain, Size: 1423 bytes --]
> Applied. thanks!
>
> Alex
Thanks a lot!
zhong.shiqi
> On Wed, Oct 23, 2019 at 9:35 AM Harry Wentland <hwentlan@amd.com> wrote:
> >
> > 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));
> > >
> > _______________________________________________
> > amd-gfx mailing list
> > amd-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2019-10-28 8:25 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 8:32 [PATCH] dc.c:use kzalloc without test zhongshiqi
2019-10-23 8:32 ` zhongshiqi
2019-10-23 8:32 ` zhongshiqi
2019-10-23 13:35 ` Harry Wentland
2019-10-23 13:35 ` Harry Wentland
2019-10-23 13:35 ` Harry Wentland
2019-10-23 13:35 ` Harry Wentland
2019-10-25 19:32 ` Alex Deucher
2019-10-25 19:32 ` Alex Deucher
2019-10-25 19:32 ` Alex Deucher
2019-10-25 19:32 ` Alex Deucher
2019-10-26 2:57 ` zhong.shiqi
2019-10-26 2:57 ` zhong.shiqi
2019-10-26 2:57 ` zhong.shiqi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.