drm/amd/powerplay: fixed uninitialized value
Subsystems (2)
PATCH 1/1 drm/amd/powerplay: fixed uninitialized value
The 'result' is not initialized correctly. It causes the API return an error code even on success.
Change-Id I14aea88b4022b490fb073bc1d4713f4edb96fb46
Signed-off-by Evan Quan <[email protected]>
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +1 -1
@@ -488,7 +488,7 @@ static int vega12_get_number_of_dpm_level(struct pp_hwmgr *hwmgr,static int vega12_get_dpm_frequency_by_index (struct pp_hwmgr *hwmgr,PPCLK_e clkID,uint32_t index,uint32_t *clock) { -int result; +int result =0 ;/* *SMU expects the Clock ID to be in the top 16 bits.
Signature · 6 lines
2.18.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
Huang Rui
Acked-byQuoted 5 lines · Evan Quan
The 'result' is not initialized correctly. It causes the API return an error code even on success.
Change-Id I14aea88b4022b490fb073bc1d4713f4edb96fb46Signed-off-by Evan Quan <[email protected]>
Acked-by Huang Rui <[email protected]>
Quoted 24 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +1
-1@@ -488,7 +488,7 @@ static int vega12_get_number_of_dpm_level(struct pp_hwmgr *hwmgr,static int vega12_get_dpm_frequency_by_index (struct pp_hwmgr *hwmgr,PPCLK_e clkID,uint32_t index,uint32_t *clock) { -int result; +int result =0 ;/* *SMU expects the Clock ID to be in the top 16 bits. Signature · 6 lines
2.18.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx