mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
drm/amdgpu: fix wrong sizeof argument
voltage_parameters is a point to a struct of type
SET_VOLTAGE_PARAMETERS_V1_3. Passing just voltage_parameters would
not print the right size of the struct variable. So we need to pass
*voltage_parameters to sizeof().
Fixes: 4630d5031c ("drm/amdgpu: check PS, WS index")
Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
00a11f977b
commit
3e22174603
|
|
@ -1526,7 +1526,7 @@ int atomctrl_get_leakage_id_from_efuse(struct pp_hwmgr *hwmgr, uint16_t *virtual
|
|||
|
||||
result = amdgpu_atom_execute_table(adev->mode_info.atom_context,
|
||||
GetIndexIntoMasterTable(COMMAND, SetVoltage),
|
||||
(uint32_t *)voltage_parameters, sizeof(voltage_parameters));
|
||||
(uint32_t *)voltage_parameters, sizeof(*voltage_parameters));
|
||||
|
||||
*virtual_voltage_id = voltage_parameters->usVoltageLevel;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user