Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdkfd: uninitialized variable in dbgdev_wave_control_set_registers()

At the end of the function we expect "status" to be zero, but it's
either -EINVAL or uninitialized.

Fixes: 788bf83db301 ('drm/amdkfd: Add wave control operation to debugger')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>

authored by

Dan Carpenter and committed by
Oded Gabbay
93fce954 211afd57

+1 -1
+1 -1
drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c
··· 513 513 union SQ_CMD_BITS *in_reg_sq_cmd, 514 514 union GRBM_GFX_INDEX_BITS *in_reg_gfx_index) 515 515 { 516 - int status; 516 + int status = 0; 517 517 union SQ_CMD_BITS reg_sq_cmd; 518 518 union GRBM_GFX_INDEX_BITS reg_gfx_index; 519 519 struct HsaDbgWaveMsgAMDGen2 *pMsg;