提交 317469f6 编写于 作者: L Li Heng 提交者: Alex Deucher

drm/amd/powerplay: Remove unneeded cast from memory allocation

Remove casting the values returned by memory allocation function.

Coccinelle emits WARNING:

./drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c:893:37-46: WARNING: casting value returned by memory allocation function to (PPTable_t *) is useless.
Signed-off-by: NLi Heng <liheng40@huawei.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 8e326285
......@@ -890,7 +890,7 @@ static int init_powerplay_table_information(
power_saving_clock_count);
}
pptable_information->smc_pptable = (PPTable_t *)kmalloc(sizeof(PPTable_t), GFP_KERNEL);
pptable_information->smc_pptable = kmalloc(sizeof(PPTable_t), GFP_KERNEL);
if (pptable_information->smc_pptable == NULL)
return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册