1
0
Fork 0

drm/amdgpu/vi: silence an uninitialized variable warning

Smatch complains that we need to initialized "*cap" otherwise it can
lead to an uninitialized variable bug in the caller.  This seems like a
reasonable warning and it doesn't hurt to silence it at least.

drivers/gpu/drm/amd/amdgpu/vi.c:767 vi_asic_reset_method() error: uninitialized symbol 'baco_reset'.

Fixes: 425db2553e ("drm/amdgpu: expose BACO interfaces to upper level from PP")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
alistair/sunxi64-5.5-dsi
Dan Carpenter 2019-10-17 12:12:16 +03:00 committed by Alex Deucher
parent 17523bd00c
commit 4ff17a1df7
1 changed files with 1 additions and 0 deletions

View File

@ -1421,6 +1421,7 @@ static int pp_get_asic_baco_capability(void *handle, bool *cap)
{
struct pp_hwmgr *hwmgr = handle;
*cap = false;
if (!hwmgr)
return -EINVAL;