[PATCH 2/2] drm/amd/amdgpu: Fix maybe-uninitialized warning in df_v3_6_pmc_start
Alex Deucher
alexdeucher at gmail.com
Thu May 16 12:22:33 UTC 2019
Series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
On Wed, May 15, 2019 at 4:24 PM Bhawanpreet Lakha
<Bhawanpreet.Lakha at amd.com> wrote:
>
> This fixes the warning below
>
> error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> int xgmi_tx_link, ret;
> ^~~
> Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c b/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
> index 201c00411720..a8442508eea5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
> +++ b/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
> @@ -459,7 +459,7 @@ static int df_v3_6_stop_xgmi_link_cntr(struct amdgpu_device *adev,
> static int df_v3_6_pmc_start(struct amdgpu_device *adev, uint64_t config,
> int is_enable)
> {
> - int xgmi_tx_link, ret;
> + int xgmi_tx_link, ret = 0;
>
> switch (adev->asic_type) {
> case CHIP_VEGA20:
> --
> 2.17.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list