* [PATCH] drm/amd/powerplay: fix memory allocation failure check V2
@ 2019-07-12 5:22 Evan Quan
[not found] ` <20190712052242.20369-1-evan.quan-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Evan Quan @ 2019-07-12 5:22 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Evan Quan
Fix memory allocation failure check.
- V2: fix one more similar error
Change-Id: I012b082a7a2b92973a76db8029897fb4a3441694
Signed-off-by: Evan Quan <evan.quan@amd.com>
---
drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
index 1fc367307ac0..c826e65430b6 100644
--- a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
@@ -319,7 +319,7 @@ static int vega20_tables_init(struct smu_context *smu, struct smu_table *tables)
AMDGPU_GEM_DOMAIN_VRAM);
smu_table->metrics_table = kzalloc(sizeof(SmuMetrics_t), GFP_KERNEL);
- if (smu_table->metrics_table)
+ if (!smu_table->metrics_table)
return -ENOMEM;
smu_table->metrics_time = 0;
@@ -1502,7 +1502,7 @@ static int vega20_set_default_od8_setttings(struct smu_context *smu)
od8_settings = kzalloc(sizeof(struct vega20_od8_settings), GFP_KERNEL);
- if (od8_settings)
+ if (!od8_settings)
return -ENOMEM;
smu->od_settings = (void *)od8_settings;
--
2.21.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] drm/amd/powerplay: fix memory allocation failure check V2
[not found] ` <20190712052242.20369-1-evan.quan-5C7GfCeVMHo@public.gmane.org>
@ 2019-07-16 3:01 ` Quan, Evan
2019-07-16 3:29 ` Alex Deucher
1 sibling, 0 replies; 3+ messages in thread
From: Quan, Evan @ 2019-07-16 3:01 UTC (permalink / raw)
To: Quan, Evan, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Ping..
> -----Original Message-----
> From: Evan Quan <evan.quan@amd.com>
> Sent: Friday, July 12, 2019 1:23 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Quan, Evan <Evan.Quan@amd.com>
> Subject: [PATCH] drm/amd/powerplay: fix memory allocation failure check
> V2
>
> Fix memory allocation failure check.
>
> - V2: fix one more similar error
>
> Change-Id: I012b082a7a2b92973a76db8029897fb4a3441694
> Signed-off-by: Evan Quan <evan.quan@amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> index 1fc367307ac0..c826e65430b6 100644
> --- a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> +++ b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> @@ -319,7 +319,7 @@ static int vega20_tables_init(struct smu_context
> *smu, struct smu_table *tables)
> AMDGPU_GEM_DOMAIN_VRAM);
>
> smu_table->metrics_table = kzalloc(sizeof(SmuMetrics_t),
> GFP_KERNEL);
> - if (smu_table->metrics_table)
> + if (!smu_table->metrics_table)
> return -ENOMEM;
> smu_table->metrics_time = 0;
>
> @@ -1502,7 +1502,7 @@ static int vega20_set_default_od8_setttings(struct
> smu_context *smu)
>
> od8_settings = kzalloc(sizeof(struct vega20_od8_settings),
> GFP_KERNEL);
>
> - if (od8_settings)
> + if (!od8_settings)
> return -ENOMEM;
>
> smu->od_settings = (void *)od8_settings;
> --
> 2.21.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/powerplay: fix memory allocation failure check V2
[not found] ` <20190712052242.20369-1-evan.quan-5C7GfCeVMHo@public.gmane.org>
2019-07-16 3:01 ` Quan, Evan
@ 2019-07-16 3:29 ` Alex Deucher
1 sibling, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2019-07-16 3:29 UTC (permalink / raw)
To: Evan Quan; +Cc: amd-gfx list
On Fri, Jul 12, 2019 at 1:22 AM Evan Quan <evan.quan@amd.com> wrote:
>
> Fix memory allocation failure check.
>
> - V2: fix one more similar error
>
> Change-Id: I012b082a7a2b92973a76db8029897fb4a3441694
> Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> index 1fc367307ac0..c826e65430b6 100644
> --- a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> +++ b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> @@ -319,7 +319,7 @@ static int vega20_tables_init(struct smu_context *smu, struct smu_table *tables)
> AMDGPU_GEM_DOMAIN_VRAM);
>
> smu_table->metrics_table = kzalloc(sizeof(SmuMetrics_t), GFP_KERNEL);
> - if (smu_table->metrics_table)
> + if (!smu_table->metrics_table)
> return -ENOMEM;
> smu_table->metrics_time = 0;
>
> @@ -1502,7 +1502,7 @@ static int vega20_set_default_od8_setttings(struct smu_context *smu)
>
> od8_settings = kzalloc(sizeof(struct vega20_od8_settings), GFP_KERNEL);
>
> - if (od8_settings)
> + if (!od8_settings)
> return -ENOMEM;
>
> smu->od_settings = (void *)od8_settings;
> --
> 2.21.0
>
> _______________________________________________
> 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] 3+ messages in thread
end of thread, other threads:[~2019-07-16 3:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-12 5:22 [PATCH] drm/amd/powerplay: fix memory allocation failure check V2 Evan Quan
[not found] ` <20190712052242.20369-1-evan.quan-5C7GfCeVMHo@public.gmane.org>
2019-07-16 3:01 ` Quan, Evan
2019-07-16 3:29 ` Alex Deucher
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.