[PATCH -next v3] drm/amdgpu: return 'ret' immediately if failed in amdgpu_pmu_init

2019-06-23 Thread Mao Wenan
There is one warning: drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c: In function ‘amdgpu_pmu_init’: drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:249:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret = 0; ^ amdgpu_pmu_init() is called by amdgpu_device_init() in drivers/g

Re: [PATCH -next v2] drm/amdgpu: return 'ret' in amdgpu_pmu_init

2019-06-23 Thread maowenan
On 2019/6/23 2:13, Joe Perches wrote: > On Sat, 2019-06-22 at 21:05 +0800, Mao Wenan wrote: >> There is one warning: >> drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c: In function ‘amdgpu_pmu_init’: >> drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:249:6: warning: variable ‘ret’ set >> but not used [-Wunused

Re: [PATCH -next v2] drm/amdgpu: return 'ret' in amdgpu_pmu_init

2019-06-23 Thread Joe Perches
On Mon, 2019-06-24 at 11:41 +0800, maowenan wrote: > > On 2019/6/23 2:13, Joe Perches wrote: > > On Sat, 2019-06-22 at 21:05 +0800, Mao Wenan wrote: > > > There is one warning: > > > drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c: In function ‘amdgpu_pmu_init’: > > > drivers/gpu/drm/amd/amdgpu/amdgpu_pmu