[PATCH] drm/amd/powerplay: fixed uninitialized value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 19, 2018 at 01:28:22PM +0800, Evan Quan wrote:
> 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 <evan.quan at amd.com>

Acked-by: Huang Rui <ray.huang at amd.com>

> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
> index 175581666919..e3b11ae8fdb8 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
> @@ -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.
> -- 
> 2.18.0
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux