From eb923ea6fa77ac5ec9eca617444d34b179669a2e Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Sat, 16 Jul 2016 15:36:36 +0200 Subject: [PATCH] drm/amd/powerplay: Change assignment for a buffer variable in phm_dispatch_table() v2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The variable "temp_storage" was eventually reassigned with a pointer. Thus omit the explicit initialisation at the beginning. v2: agd: fix coding style Reviewed-by: Christian König Signed-off-by: Markus Elfring Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c index bbdedec150f9..d4225a09e3e8 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c @@ -60,7 +60,7 @@ int phm_dispatch_table(struct pp_hwmgr *hwmgr, void *input, void *output) { int result = 0; - void *temp_storage = NULL; + void *temp_storage; if (hwmgr == NULL || rt_table == NULL) { printk(KERN_ERR "[ powerplay ] Invalid Parameter!\n"); @@ -73,6 +73,8 @@ int phm_dispatch_table(struct pp_hwmgr *hwmgr, printk(KERN_ERR "[ powerplay ] Could not allocate table temporary storage\n"); return -ENOMEM; } + } else { + temp_storage = NULL; } result = phm_run_table(hwmgr, rt_table, input, output, temp_storage); -- 2.20.1