drm/amdkfd: uninitialized variable in dbgdev_wave_control_set_registers()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 11 Mar 2016 07:51:51 +0000 (10:51 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 15 Mar 2016 12:09:37 +0000 (14:09 +0200)
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>
drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c

index c34c393e9aea0c2dfe3442c28a72f2206fbcd7fb..d5e19b5fbbfb00d1fbbcd1066da0ac4f12424ec3 100644 (file)
@@ -513,7 +513,7 @@ static int dbgdev_wave_control_set_registers(
                                union SQ_CMD_BITS *in_reg_sq_cmd,
                                union GRBM_GFX_INDEX_BITS *in_reg_gfx_index)
 {
-       int status;
+       int status = 0;
        union SQ_CMD_BITS reg_sq_cmd;
        union GRBM_GFX_INDEX_BITS reg_gfx_index;
        struct HsaDbgWaveMsgAMDGen2 *pMsg;