mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 11:33:28 +02:00
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: Li Heng <liheng40@huawei.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
8e32628592
commit
317469f695
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user